Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Latest commit

 

History

History
41 lines (26 loc) · 1.36 KB

README.md

File metadata and controls

41 lines (26 loc) · 1.36 KB

kiam-webapp CircleCI

Source of the Frontend code (Angular) + Docker configuration of the Frontend Webapp

Serve the webapp HTTPS (localhost)

ng serve -o --ssl --ssl-cert ssl/server.crt --ssl-key ssl/server.key

requirement for Stripe : valid HTTPS only

Build the webapp

Production

Set the --base-href if webapp must be accessed from https://www.kiam.fr/dist/

ng build --prod --base-href "/dist/"

✋ Remove the --base-href if webapp must be accessed from https://www.kiam.fr/

ng build --prod

Build the docker image

♻️ Image is automatically build on Docker Hub

Build the image

docker build -t trendev/kiam-webapp .

Push the image into Docker Hub

docker push trendev/kiam-webapp

Redeployment (with docker running with sudo user)

1. stop previous container

sudo docker stop kiam-webapp

2. remove previous image

sudo docker rmi trendev/kiam-webapp

3. run a new container from the new image

sudo docker run -d --rm -p 3000:80 --name kiam-webapp trendev/kiam-webapp

💫 Execute all steps

sudo docker stop kiam-webapp && sudo docker rmi trendev/kiam-webapp && sudo docker run -d --rm -p 3000:80 --name kiam-webapp trendev/kiam-webapp