配置nginx
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m2s

This commit is contained in:
Song367 2026-03-19 12:42:28 +08:00
parent d73178c84d
commit d10c788535
2 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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/;
}
}
}