la base du site fonctionnelle

This commit is contained in:
styve Lioumba
2024-09-25 15:58:42 +02:00
committed by styve Lioumba
parent 27d260829c
commit 1bf76c6c66
92 changed files with 14820 additions and 1 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
# ETAPE 1: Construire l'application
FROM node:20-alpine AS node-builder
ARG APP_NAME=technostrea
ARG ENVIRONMENT=production
ARG NG_VERSION=18
ENV APP_NAME=$APP_NAME
ENV ENVIRONMENT=$ENVIRONMENT
ENV NG_VERSION=$NG_VERSION
WORKDIR /app
COPY package*.json ./
RUN npm cache clean --force
RUN npm install -g @angular/cli@$NG_VERSION
COPY . .
RUN npm install --legacy-peer-deps
RUN ng build --configuration=$ENVIRONMENT --output-path=dist/
# ETAPE 2: Héberger l'application sur un serveur web nginx
FROM nginx:1.26.0-alpine as server
EXPOSE 80
WORKDIR /usr/share/nginx/html
RUN rm -rf /usr/share/nginx/html/*
COPY --from=node-builder /app/dist/browser /usr/share/nginx/html
COPY --from=node-builder /app/nginx.conf /etc/nginx/conf.d/default.conf