- eslint ^10 → ^9 다운그레이드 (react-hooks 플러그인 호환) - .npmrc 제거, Dockerfile legacy-peer-deps 플래그 제거 - Dockerfile node:lts → node:22-alpine 버전 고정, ARG 오타 수정 - .dockerignore 추가 (.env, node_modules, .git 등 제외) - .env 삭제, .env.development 추가 (로컬 기본값 git 관리) - vite.config.js dev proxy 추가 (/api → localhost:8080) - index.html favicon, OG 태그, Pretendard 폰트 로드 추가 - nginx.conf /images/ 캐시 전략 추가, 주석 정리 - eslint.config.js ecmaVersion 중복 선언 정리 - deploy.yml --legacy-peer-deps, --no-cache 제거, 배포 커맨드 가독성 개선 - .github/workflows/ci.yml 삭제 (Gitea 사용으로 불필요) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
984 B
Nginx Configuration File
33 lines
984 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
|
|
# index.html은 캐싱 금지 (배포 후 즉시 반영)
|
|
location = /index.html {
|
|
try_files $uri =404;
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
|
}
|
|
|
|
# Vite 빌드 에셋 장기 캐싱 (파일명에 해시 포함 — 내용 변경 시 URL도 바뀜)
|
|
location /assets/ {
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
}
|
|
|
|
# 정적 이미지 단기 캐싱 (해시 없는 파일)
|
|
location /images/ {
|
|
add_header Cache-Control "public, max-age=86400";
|
|
}
|
|
|
|
# SPA fallback (react-router 사용 시 필요)
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
gzip_min_length 1024;
|
|
} |