This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,7 +1,7 @@
|
||||
# ==============================
|
||||
# 1️⃣ Build Angular (Node)
|
||||
# ==============================
|
||||
FROM node:18-alpine AS build
|
||||
FROM node:18-alpine AS compile
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -24,16 +24,16 @@ RUN node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --co
|
||||
# ==============================
|
||||
# 2️⃣ Serveur Nginx
|
||||
# ==============================
|
||||
FROM nginx:latest
|
||||
FROM nginx:latest as build
|
||||
|
||||
# Supprimer config par défaut
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
COPY --from=build /app/dist/infocad-back-office/ /usr/share/nginx/html
|
||||
COPY --from=compile /app/dist/infocad-back-office/ /usr/share/nginx/html
|
||||
|
||||
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=compile /app/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
COPY --from=build /app/.htaccess /usr/share/nginx/html
|
||||
COPY --from=compile /app/.htaccess /usr/share/nginx/html
|
||||
|
||||
RUN chmod -R 777 /usr/share/nginx/html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user