add nginx

This commit is contained in:
Николай Вигдоров
2025-03-10 00:07:25 +03:00
parent 3f8e4849f1
commit 2d340d9384
2 changed files with 19 additions and 0 deletions

View File

@ -9,5 +9,6 @@ RUN npm run build
# production environment # production environment
FROM nginx:alpine FROM nginx:alpine
COPY --from=builder /app/build /usr/share/nginx/html COPY --from=builder /app/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

18
nginx.conf Normal file
View File

@ -0,0 +1,18 @@
events {}
http {
server {
listen 80;
location /stub_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
location / {
root /usr/share/nginx/html;
index index.html;
}
}
}