build utils

This commit is contained in:
2024-04-12 22:44:02 +03:00
parent 8df8f5a2e9
commit f6d316cb5e
7 changed files with 68 additions and 4 deletions

11
nginx/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:21-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY ./frontend/app .
RUN npm ci
RUN npm run build
FROM nginx:1.25.4-alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,6 +1,6 @@
server {
listen 80;
server_name 192.168.1.121;
server_name queueful.ollyhearn.ru;
location / {
proxy_hide_header 'Access-Control-Allow-Origin';
add_header 'Access-Control-Allow-Origin' '*' always;
@ -25,7 +25,7 @@ server {
proxy_hide_header 'Access-Control-Allow-Methods';
add_header 'Access-Control-Allow-Methods' '*' always;
proxy_pass http://api:8000/api/;
proxy_pass http://backend:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;