This commit is contained in:
26
DockerfileWeb
Normal file
26
DockerfileWeb
Normal 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)
|
||||
Reference in New Issue
Block a user