diff --git a/Dockerfile b/Dockerfile index c88e458..ecd4743 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,9 +12,11 @@ RUN yarn build # production environment -FROM nginx:1.16.0-alpine +FROM nginx:stable-alpine COPY --from=build /app/dist /usr/share/nginx/html +RUN rm /etc/nginx/conf.d/default.conf +COPY nginx/nginx.conf /etc/nginx/conf.d EXPOSE 80 diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..539bb8f --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 80; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file