Files
CrawlFlix-Front/Dockerfile
2024-09-26 15:57:25 +02:00

20 lines
602 B
Docker

# Build stage
FROM node:22 AS crawlflix-front-build
WORKDIR /app
# Add full context
ARG CONFIGURATION=production
ENV CONFIGURATION $CONFIGURATION
ARG build_number=0
ENV BUILD_NUMBER $build_number
COPY . .
# Install deps
RUN npm install -f
RUN npm install -g @angular/cli
RUN echo "export const version = { number: '${BUILD_NUMBER}' }" > ./src/version.ts
# Build dist
RUN ng build --configuration=${CONFIGURATION} --output-hashing=all
# Create stage
FROM nginx:latest
COPY --from=crawlflix-front-build /app/dist/crawlflix/browser/ /usr/share/nginx/html/
COPY /nginx.conf /etc/nginx/conf.d/default.conf