配置nginx
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m2s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m2s
This commit is contained in:
parent
d73178c84d
commit
d10c788535
@ -13,6 +13,7 @@ FROM node:22.14.0-alpine3.21 AS production-stage
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache nginx ffmpeg
|
RUN apk add --no-cache nginx ffmpeg
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
COPY --from=build-stage /app /app
|
COPY --from=build-stage /app /app
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|||||||
10
nginx.conf
10
nginx.conf
@ -20,7 +20,7 @@ http {
|
|||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location /api/ {
|
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_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@ -31,13 +31,9 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
alias /app/dist/;
|
root /app/dist;
|
||||||
index index.html;
|
index index.html;
|
||||||
try_files $uri $uri/ /video_translate/index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /video_translate {
|
|
||||||
return 301 /video_translate/;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user