Skip to content

Commit

Permalink
Tweak Docker configuration, add Nginx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
nickstamat committed Dec 28, 2019
1 parent e2e54b3 commit 5195a92
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
/Dockerfile
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ WORKDIR /build
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
ENV NODE_ENV production
RUN yarn build:production

FROM nginx:1.17-alpine
COPY --from=build /build/dist /usr/share/nginx/html
COPY ops/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /build/dist/ /app
10 changes: 10 additions & 0 deletions ops/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server {
listen 80;
server_name _;

location / {
root /app;
index index.html;
try_files $uri $uri/ $uri.html =404;
}
}

0 comments on commit 5195a92

Please sign in to comment.