Created
June 16, 2020 13:50
-
-
Save jlandure/447256d656c745d8ba563d95e8badbc1 to your computer and use it in GitHub Desktop.
Nginx with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM zenika/alpine-node as build | |
COPY package.json package-lock.json ./ | |
RUN npm i | |
COPY . . | |
RUN npm run build | |
FROM nginx:alpine | |
ENV PORT 8080 | |
COPY --from=build /usr/src/app/dist /usr/share/nginx/html | |
CMD sh -c "sed -i -e 's/80;/${PORT};/g' /etc/nginx/conf.d/default.conf \ | |
&& exec nginx -g 'daemon off;'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment