diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..69be12b --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:stable-alpine + +COPY ./conf/nginx.conf /etc/nginx/nginx.conf + +WORKDIR /app +COPY ./src/. . + +EXPOSE 8000 \ No newline at end of file diff --git a/frontend/conf/nginx.conf b/frontend/conf/nginx.conf new file mode 100644 index 0000000..6fb2c95 --- /dev/null +++ b/frontend/conf/nginx.conf @@ -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/; + } + } +} \ No newline at end of file