v4.0.0: 회원·덱 API, 인증 UI, 프로필 및 레이아웃 통일
Express/SQLite API와 Docker 구성을 추가하고 로그인·덱 저장·공개 덱·관리자·프로필 화면을 구현했다. 결과 화면 저장 UX, 헤더 프로필, 애드센스용 app-shell 레이아웃(1280px) 및 문서를 반영했다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
11
nginx/Dockerfile
Normal file
11
nginx/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 정적 사이트 (docker-compose build context = 프로젝트 루트)
|
||||
COPY index.html cardList.html result.html login.html signup.html deckHistory.html preset.html admin.html /usr/share/nginx/html/
|
||||
COPY script /usr/share/nginx/html/script
|
||||
COPY style /usr/share/nginx/html/style
|
||||
COPY i18n /usr/share/nginx/html/i18n
|
||||
COPY datas /usr/share/nginx/html/datas
|
||||
COPY images /usr/share/nginx/html/images
|
||||
35
nginx/default.conf
Normal file
35
nginx/default.conf
Normal file
@@ -0,0 +1,35 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
client_max_body_size 2m;
|
||||
|
||||
# 공유 링크: /d/x7Kp9m2Q → cardList?d=
|
||||
location ~ ^/d/([A-Za-z0-9]+)$ {
|
||||
return 302 /cardList.html?d=$1;
|
||||
}
|
||||
|
||||
# API → 백엔드 컨테이너
|
||||
location /api/ {
|
||||
proxy_pass http://uadeck-api:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# 정적 자산 캐시
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|webp|ico|svg|woff2?)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
16
nginx/uadeck.conf
Normal file
16
nginx/uadeck.conf
Normal file
@@ -0,0 +1,16 @@
|
||||
# /d/:shareCode → cardList 리다이렉트
|
||||
# 리버스 프록시(Nginx, Caddy, Traefik)에 아래 규칙을 추가하세요.
|
||||
|
||||
location ~ ^/d/([A-Za-z0-9]+)$ {
|
||||
return 302 /cardList.html?d=$1;
|
||||
}
|
||||
|
||||
# API 프록시 (정적 사이트와 함께 사용)
|
||||
location /api/ {
|
||||
proxy_pass http://uadeck-api:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
Reference in New Issue
Block a user