22 lines
571 B
Docker
22 lines
571 B
Docker
# syntax=docker/dockerfile:1
|
|
# 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 /app/eo-services
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
COPY default.conf.template /etc/nginx/templates/default.conf.template
|
|
COPY headers.js /etc/nginx/headers.js
|
|
|
|
COPY ./40-envsub-on-vite.sh /docker-entrypoint.d
|
|
RUN chmod u+x /docker-entrypoint.d/40-envsub-on-vite.sh
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"] |