From e2b0c9f5eea0f057e5f1ebbd6deff9c5a4bb30ba Mon Sep 17 00:00:00 2001 From: PEDROLI Benjamin <benjamin.pedroli@soprasteria.com> Date: Fri, 12 Mar 2021 15:12:30 +0100 Subject: [PATCH] add usefull docker command --- .../launch_local_application.md | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md b/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md index 7efb6e2..be6894d 100644 --- a/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md +++ b/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md @@ -38,4 +38,28 @@ To start test defined just run the command in a PowerShell or Windows Powershell yarn test:watch ``` -Don't forget to uncomment ending row into beneficiary.service.ts file before to run the above command. \ No newline at end of file +Don't forget to uncomment ending row into beneficiary.service.ts file before to run the above command. + + +### Usefull docker command + +- build : `docker build -t mps .` + +- run container : `docker-compose -f docker-compose.yml up --remove-orphans` + +- acceder à la db du container: `docker exec -it mps-travailleursocial-back_postgres_1 psql -U postgres` + +- delete image/containers: `docker system prune -a -f` + +- voir le contenu du container: `docker exec -it <id_container> bash` + +- remove container: `docker container rm -f <id_container>` + +## Synapps environment + +- check mps container : `docker ps --filter "name=mps"` or use this alias created : `dpm` + +- docker stop <id_container> + +- run a service from the docker-compose file: `docker-compose up -d <name_of_service>` | +example: `docker-compose up -d mps-prod` , `docker-compose up -d app` , .... \ No newline at end of file -- GitLab