Files
YABA/Web/Dockerfile
Carl Tibule 456b8ef75b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Created Woodpecker CI/CD deployment
- Created Dockerfile for packing up API and Web projects as Docker image
2024-03-30 22:54:16 -05:00

22 lines
492 B
Docker

FROM node:17-alpine as builder
# Set the environment variables
ARG REACT_APP_API_BASE_URL
ARG REACT_APP_AUTH0_DOMAIN
ARG REACT_APP_AUTH0_CLIENT_ID
ARG REACT_APP_AUTH0_CALLBACK_URL
ARG REACT_APP_AUTH0_AUDIENCE
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
RUN npm run build
FROM nginx:mainline-alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /app/build .
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]