Created
April 1, 2020 16:05
-
-
Save danazkari/ae9d9aab2c913a73f451f7bacdbd8400 to your computer and use it in GitHub Desktop.
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 node:12-slim as builder | |
WORKDIR /usr/src/app | |
COPY package.json . | |
COPY yarn*.lock . | |
RUN yarn --frozen-lockfile | |
COPY . . | |
RUN yarn build | |
FROM nginx:1.16.1-alpine as server | |
COPY --from=builder /usr/src/app/build /usr/share/nginx/html | |
COPY --from=builder /usr/src/app/nginx.conf /etc/nginx/conf.d/default.conf |
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
server { | |
listen 80; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
try_files $uri $uri/ /index.html =404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment