add Dockerfile and nginx configuration

This commit is contained in:
agatha 2024-04-06 17:50:21 -04:00
parent 45c7886090
commit 8f2d6b1613
2 changed files with 30 additions and 0 deletions

8
frontend/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM nginx:stable-alpine
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
WORKDIR /app
COPY ./src/. .
EXPOSE 8000

22
frontend/conf/nginx.conf Normal file
View File

@ -0,0 +1,22 @@
events {
worker_connections 1024;
}
http {
server {
listen 8000 default_server;
listen [::]:8000 default_server;
root /app;
index index.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location /api/ {
proxy_pass http://backend:8000/;
}
}
}