Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ services:
SPRING_CLOUD_GATEWAY_ROUTES_1_PREDICATES_0: Path=/api/v1/users/**,/api/v1/tenants/**
SPRING_CLOUD_GATEWAY_ROUTES_2_ID: event-service
SPRING_CLOUD_GATEWAY_ROUTES_2_URI: http://event-service:8083
SPRING_CLOUD_GATEWAY_ROUTES_2_PREDICATES_0: Path=/api/v1/concerts/**,/api/v1/schedules/**,/api/v1/admin/seats/**
SPRING_CLOUD_GATEWAY_ROUTES_2_PREDICATES_0: Path=/api/v1/concerts/**,/api/v1/schedules/**,/api/v1/admin/seats/**,/api/v1/admin/events/**,/api/v1/admin/venues/**
SPRING_CLOUD_GATEWAY_ROUTES_3_ID: reservation-service
SPRING_CLOUD_GATEWAY_ROUTES_3_URI: http://reservation-service:8084
SPRING_CLOUD_GATEWAY_ROUTES_3_PREDICATES_0: Path=/api/v1/reservations/**,/api/v1/queue/**,/api/v1/live/**,/api/v1/lottery/**
Expand Down Expand Up @@ -271,6 +271,8 @@ services:
REDIS_HOST: redis
REDIS_PORT: 6379
KAFKA_BOOTSTRAP_SERVERS: kafka:29092
# OpenAI (AI 이벤트 생성)
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
depends_on:
postgres:
condition: service_healthy
Expand Down
38 changes: 19 additions & 19 deletions docker/Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ FROM nginx:alpine

COPY --from=builder /app/dist /usr/share/nginx/html

# nginx.conf는 docker-compose volume mount 또는 별도 COPY로 제공
# 기본 설정: SPA fallback + API 프록시
RUN echo 'server { \n\
listen 3000; \n\
server_name localhost; \n\
root /usr/share/nginx/html; \n\
index index.html; \n\
location / { try_files $uri $uri/ /index.html; } \n\
location /api/ { \n\
proxy_pass http://gateway:8080; \n\
proxy_set_header Host $host; \n\
proxy_set_header X-Real-IP $remote_addr; \n\
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \n\
proxy_http_version 1.1; \n\
proxy_read_timeout 300s; \n\
} \n\
gzip on; \n\
gzip_types text/plain text/css application/json application/javascript text/xml; \n\
}' > /etc/nginx/conf.d/default.conf
# SPA fallback + API 프록시
RUN printf 'server {\n\
listen 3000;\n\
server_name localhost;\n\
root /usr/share/nginx/html;\n\
index index.html;\n\
location / { try_files $uri $uri/ /index.html; }\n\
location = /index.html { add_header Cache-Control "no-cache, no-store, must-revalidate"; }\n\
location /api/ {\n\
proxy_pass http://gateway:8080;\n\
proxy_set_header Host $host;\n\
proxy_set_header X-Real-IP $remote_addr;\n\
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
proxy_http_version 1.1;\n\
proxy_read_timeout 300s;\n\
}\n\
gzip on;\n\
gzip_types text/plain text/css application/json application/javascript text/xml;\n\
}\n' > /etc/nginx/conf.d/default.conf

EXPOSE 3000

Expand Down