Add Dockerfile + nginx conf + add woodpecker CI file
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user