diff --git a/Dockerfile b/Dockerfile index 844277a..9ad80db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ FROM node:22.14.0-alpine3.21 AS production-stage WORKDIR /app RUN apk add --no-cache nginx ffmpeg +ENV NODE_ENV=production COPY --from=build-stage /app /app COPY nginx.conf /etc/nginx/nginx.conf diff --git a/nginx.conf b/nginx.conf index c0ca833..2cb2411 100644 --- a/nginx.conf +++ b/nginx.conf @@ -20,7 +20,7 @@ http { server_name localhost; location /api/ { - proxy_pass http://127.0.0.1:3000/video_translate/api/; + proxy_pass http://127.0.0.1:3000/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -31,13 +31,9 @@ http { } location / { - alias /app/dist/; + root /app/dist; index index.html; - try_files $uri $uri/ /video_translate/index.html; + try_files $uri $uri/ /index.html; } - - location = /video_translate { - return 301 /video_translate/; - } } }