diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..583ad5e --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,6 @@ +FROM nginx:alpine + +EXPOSE 80 + +COPY docker/nginx.conf /etc/nginx/conf.d/default.conf +COPY dist/ /var/www/html/ diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 0000000..984efb0 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,20 @@ +gzip on; +gzip_proxied any; +gzip_vary on; +gzip_buffers 16 8k; +gzip_types *; + +server { + listen 80; + server_name localhost; + root /var/www/html; + + location / { + root /var/www/html; + try_files $uri /index.html; + } + + location = /index.html { + add_header 'Cache-Control' 'no-cache'; + } +}