michals-silly-game-frontend/Dockerfile
miwr 3e42c4e2ba
All checks were successful
ci / build (push) Successful in 1m27s
ARG LOCAL=false
RUN if [ "$LOCAL" = "true" ]; then \
      cp src/environments/environment.local.ts src/environments/environment.ts; \
    fi
2025-04-15 14:51:14 +02:00

17 lines
No EOL
525 B
Docker

FROM node:lts-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps # or yarn install
COPY . .
ARG LOCAL=false
RUN if [ "$LOCAL" = "true" ]; then \
cp src/environments/environment.local.ts src/environments/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 /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/my-angular-app.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]