diff --git a/Dockerfile b/Dockerfile index 97781c3..ced4d5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM nginx:alpine -COPY ./public /var/www +COPY ./public /usr/share/nginx/html COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 ENTRYPOINT ["nginx","-g","daemon off;"] diff --git a/nginx.conf b/nginx.conf index d56813d..67bda5c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -33,6 +33,7 @@ http { index index.html index.htm; location / { + root /usr/share/nginx/html # First attempt to serve request as file, then # as directory, then fall back to redirecting to index.html try_files $uri $uri/ /index.html;