mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
27 lines
516 B
Docker
27 lines
516 B
Docker
# Create stage to build angular application
|
|
FROM node:18.15.0-alpine AS angular-builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json .
|
|
|
|
RUN yarn install
|
|
|
|
COPY . .
|
|
|
|
RUN yarn run build:prod
|
|
|
|
# Build NGINX Image to serve builded files
|
|
FROM nginx:stable-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# Copy dist folder fro build stage to nginx public folder
|
|
COPY --from=angular-builder /app/dist/framadate /app
|
|
|
|
# Start NgInx service
|
|
CMD ["nginx", "-g", "daemon off;"] |