second commit
Some checks failed
Angular Docker CI/CD / build-and-deploy (push) Has been cancelled

This commit is contained in:
faviem
2026-04-01 18:24:04 +01:00
parent be395dce23
commit 321dca04b4
5 changed files with 88 additions and 21 deletions

26
DockerfileWeb Normal file
View File

@@ -0,0 +1,26 @@
FROM nginx:latest as build
## Replace the default nginx index page with our Angular app
COPY ./.htaccess /usr/share/nginx/html
COPY dist/infocad-back-office /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
RUN chmod -R 777 /usr/share/nginx/html
CMD ["/bin/bash", "-c", \
"echo API_URL=[$API_URL], && \
sed -i s#MY_APP_API_URL#$API_URL#g /usr/share/nginx/html/main.*.js && \
nginx -g 'daemon off;'"]
#from my MAC
#docker build --platform linux/amd64 -t front-fiscad . ou docker build -t front-fiscad .
#docker save -o ./front-fiscad.tar front-fiscad
#docker load -i front-fiscad.tar
#docker run -d -p 8081:80 -e API_URL=http://localhost:9090/ front-fiscad
#docker ps
#docker stop CONTAINER_ID ==> docker ps (pour trouver le CONTAINER_ID)
#docker images -a
#docker rmi IMAGE_ID (supprimer une image) ==> docker ps (pour trouver le IMAGE_ID)