initial commit
This commit is contained in:
21
deploy/production/Dockerfile
Normal file
21
deploy/production/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
### STAGE 1: Build ###
|
||||
|
||||
# We label our stage as ‘builder’
|
||||
FROM node:16 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn build:live
|
||||
|
||||
# runner container
|
||||
# - nginx, to serve static built React app
|
||||
|
||||
# nginx state for serving content
|
||||
FROM nginx:stable-alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY deploy/production/nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user