diff --git a/captain-definition b/captain-definition index 1156fc7..323c683 100644 --- a/captain-definition +++ b/captain-definition @@ -1,4 +1,4 @@ { "schemaVersion": 2, - "dockerfilePath": "./Dockerfile" + "dockerfilePath": "./config/Dockerfile" } diff --git a/Dockerfile b/config/Dockerfile similarity index 75% rename from Dockerfile rename to config/Dockerfile index 7507cf9..73aaf68 100644 --- a/Dockerfile +++ b/config/Dockerfile @@ -17,9 +17,8 @@ RUN npm run build # Use Nginx as the production server FROM nginx:alpine -WORKDIR /usr/share/nginx/html - -COPY --from=build /app/dist . +COPY config/nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 diff --git a/config/nginx.conf b/config/nginx.conf new file mode 100644 index 0000000..4d14ea2 --- /dev/null +++ b/config/nginx.conf @@ -0,0 +1,15 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri /index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +}