blob: 079efeada4e9988a72ff94d9cb719d5bd01af099 [file] [log] [blame]
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY privkey.pem /etc/nginx/privkey.pem
COPY fullchain.pem /etc/nginx/fullchain.pem
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
EXPOSE 8080 443
ENTRYPOINT [ "/entrypoint.sh" ]
#CMD ["nginx", "-g", "daemon off;"]