michals-silly-game-frontend/Dockerfile
miwr 7d13685312
Some checks failed
ci / build (push) Failing after 43s
sed i
2025-04-24 14:27:04 +02:00

18 lines
No EOL
648 B
Docker

FROM node:lts-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
ARG LOCAL=false
RUN if [ "$LOCAL" = "true" ]; then \
cp src/enviroments/environment.local.ts src/enviroments/environment.ts; \
fi
RUN npm run build --prod
FROM nginx:alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist/silly-game-frontend/browser /usr/share/nginx/html/browser/silly-game
COPY --from=builder /app/dist/silly-game-frontend/3rdpartylicenses.txt /usr/share/nginx/html/3rdpartylicenses.txt
COPY ./nginx.conf /etc/nginx/conf.d/my-angular-app.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]