Skip to content

Commit

Permalink
Dockerfile adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
janschulte committed Feb 12, 2020
1 parent 39fdda3 commit 940bcae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:10-alpine AS builder
FROM node:12-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build:prod
# change setup to use shared folder inside the build

FROM nginx
LABEL maintainer="Jan Schulte <[email protected]>"
FROM nginx:1.17.8-alpine
COPY nginx/default.conf /etc/nginx/conf.d
COPY --from=builder /app/dist/frontend /usr/share/nginx/html
# the container can be started like this: docker run -p 80:80 -e PORT=80 mviz-demonstrator
CMD sed -i -e 's/$PORT/'"$PORT"'/g' /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
3 changes: 1 addition & 2 deletions nginx/default.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
server {
listen 80;
server_name localhost;
listen $PORT;

location / {
root /usr/share/nginx/html;
Expand Down

0 comments on commit 940bcae

Please sign in to comment.