From 7638fdc2981d3690310f92bd10d6c6f64962ac6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 16:34:52 +0100 Subject: [PATCH 01/16] =?UTF-8?q?Nom=20pr=C3=A9nom=20et=20NB=20groupe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- answers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/answers.md b/answers.md index defa8e2..7bdea44 100644 --- a/answers.md +++ b/answers.md @@ -1,8 +1,8 @@ # Answers -Nom: -Prénom: -NB: +Nom: GAIDIER +Prénom: Clément +NB: 4 ## 1.3 command: From cd6d468eea376e89494c017f48b74600888a760c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 16:41:05 +0100 Subject: [PATCH 02/16] 1.3 et Dockerfile back --- answers.md | 3 ++- app/back/Dockerfile | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 app/back/Dockerfile diff --git a/answers.md b/answers.md index 7bdea44..06f8456 100644 --- a/answers.md +++ b/answers.md @@ -5,7 +5,8 @@ Prénom: Clément NB: 4 ## 1.3 -command: +command: docker build -t tp2front ./ +docker run tp2front ## 1.4 answer: diff --git a/app/back/Dockerfile b/app/back/Dockerfile new file mode 100644 index 0000000..4265155 --- /dev/null +++ b/app/back/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.7.1-stretch + +WORKDIR /app/back + +COPY requirements.txt ./ +RUN pip install -r requirements.txt + +COPY . . + +CMD ["python", "-u", "./webservice.py" ] + +VOLUME /app/log From ea7d3f729491a12441d5fcbea85bac27bfbcc181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 16:43:33 +0100 Subject: [PATCH 03/16] question 1.4 --- answers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/answers.md b/answers.md index 06f8456..59f9d17 100644 --- a/answers.md +++ b/answers.md @@ -9,8 +9,8 @@ command: docker build -t tp2front ./ docker run tp2front ## 1.4 -answer: -command: +answer: Les ports TCP ne sont pas ouverts +command: docker run -p 8080:8080 tp2front ## 1.5 command: From 4b1cb3c7d8ed60a836d59db6d710f6ab97838757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 16:45:38 +0100 Subject: [PATCH 04/16] question 1.5 --- answers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/answers.md b/answers.md index 59f9d17..cfa6b5d 100644 --- a/answers.md +++ b/answers.md @@ -13,7 +13,7 @@ answer: Les ports TCP ne sont pas ouverts command: docker run -p 8080:8080 tp2front ## 1.5 -command: +command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2front ## 1.6 answer: From f8ab9b264e776e2d37c4a2f2702b3cf97a5753ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 17:12:54 +0100 Subject: [PATCH 05/16] question 1.6 --- answers.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/answers.md b/answers.md index cfa6b5d..7a3a282 100644 --- a/answers.md +++ b/answers.md @@ -16,8 +16,9 @@ command: docker run -p 8080:8080 tp2front command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2front ## 1.6 -answer: -command: +answer: L'image n'a pas de tag donc il faut associer un tag à l'image +command: docker tag tp2front clementgaidier/tp2front +docker push clementgaidier/tp2front ## 1.7 answer: From bb019f48cbf1d99d29f65fdf70b1778ea5365b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 17:32:10 +0100 Subject: [PATCH 06/16] question 1.7 --- answers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/answers.md b/answers.md index 7a3a282..5b1b235 100644 --- a/answers.md +++ b/answers.md @@ -21,10 +21,10 @@ command: docker tag tp2front clementgaidier/tp2front docker push clementgaidier/tp2front ## 1.7 -answer: -command: -command: -command: +answer: +command: docker rmi -f $(docker images -a -q) +command: docker run -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2front +command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2front ## 1.8 answer: From 281115144f7c3086123bf92528d4ed80a88ea0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 17:41:38 +0100 Subject: [PATCH 07/16] question 1.8 --- answers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/answers.md b/answers.md index 5b1b235..7e8c65c 100644 --- a/answers.md +++ b/answers.md @@ -27,9 +27,9 @@ command: docker run -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2front command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2front ## 1.8 -answer: -command: -command: +answer: nom de mon container est elastic_golick +command: docker ps +command: docker rename 557aa82f50ff tp2front ## 1.9 answer: From 1a6766d7fc287555be9dfefe33d2ed2bc5a35173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 17:44:27 +0100 Subject: [PATCH 08/16] erreur nommage de tp2front en tp2back pour toutes les questions --- answers.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/answers.md b/answers.md index 7e8c65c..b5f06c2 100644 --- a/answers.md +++ b/answers.md @@ -5,31 +5,31 @@ Prénom: Clément NB: 4 ## 1.3 -command: docker build -t tp2front ./ -docker run tp2front +command: docker build -t tp2back ./ +docker run tp2back ## 1.4 answer: Les ports TCP ne sont pas ouverts -command: docker run -p 8080:8080 tp2front +command: docker run -p 8080:8080 tp2back ## 1.5 -command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2front +command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2back ## 1.6 answer: L'image n'a pas de tag donc il faut associer un tag à l'image -command: docker tag tp2front clementgaidier/tp2front -docker push clementgaidier/tp2front +command: docker tag tp2front clementgaidier/tp2back +docker push clementgaidier/tp2back ## 1.7 answer: command: docker rmi -f $(docker images -a -q) -command: docker run -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2front -command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2front +command: docker run -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2back +command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2back ## 1.8 answer: nom de mon container est elastic_golick command: docker ps -command: docker rename 557aa82f50ff tp2front +command: docker rename 557aa82f50ff tp2back ## 1.9 answer: From 48ad91358d10b2d5ad1a6a3647eeb23ad3d62cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 17:56:45 +0100 Subject: [PATCH 09/16] =?UTF-8?q?execution=20de=20toutes=20les=20commandes?= =?UTF-8?q?=20suite=20=C3=A0=20l'erreur=20de=20nommage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- answers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/answers.md b/answers.md index b5f06c2..2222363 100644 --- a/answers.md +++ b/answers.md @@ -17,7 +17,7 @@ command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2back ## 1.6 answer: L'image n'a pas de tag donc il faut associer un tag à l'image -command: docker tag tp2front clementgaidier/tp2back +command: docker tag tp2back clementgaidier/tp2back docker push clementgaidier/tp2back ## 1.7 @@ -27,9 +27,9 @@ command: docker run -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2back command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2back ## 1.8 -answer: nom de mon container est elastic_golick +answer: nom de mon container est mystifying_cohen command: docker ps -command: docker rename 557aa82f50ff tp2back +command: docker rename 26f620eee85b tp2back ## 1.9 answer: From da93ac7d67ec902fb1bdd69bcef0d71e1c8d5bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 18:02:05 +0100 Subject: [PATCH 10/16] question 1.9 --- answers.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/answers.md b/answers.md index 2222363..4f34d38 100644 --- a/answers.md +++ b/answers.md @@ -32,8 +32,16 @@ command: docker ps command: docker rename 26f620eee85b tp2back ## 1.9 -answer: -answer: +answer: Debian 9 (stretch) +answer: PRETTY_NAME="Debian GNU/Linux 9 (stretch)" +NAME="Debian GNU/Linux" +VERSION_ID="9" +VERSION="9 (stretch)" +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" + ## 1.11 command: From 9e869b270001960f1aa9aa73008829326dc5e007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Mon, 12 Nov 2018 18:04:53 +0100 Subject: [PATCH 11/16] Dockerfile front --- app/front/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/front/Dockerfile diff --git a/app/front/Dockerfile b/app/front/Dockerfile new file mode 100644 index 0000000..bbd886f --- /dev/null +++ b/app/front/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.7.1-stretch + +WORKDIR /app/front + +COPY requirements.txt ./ +RUN pip install -r requirements.txt + +COPY . . + +CMD ["python", "-u", "./front.py" ] + +VOLUME /app/log From d1eff00d04285a61b291540de5fff369b6cae826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Tue, 13 Nov 2018 15:39:12 +0100 Subject: [PATCH 12/16] question 1.11 --- answers.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/answers.md b/answers.md index 4f34d38..3a02706 100644 --- a/answers.md +++ b/answers.md @@ -44,8 +44,12 @@ BUG_REPORT_URL="https://bugs.debian.org/" ## 1.11 -command: -answer: +command: docker run -d -p 8081:8081 -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 clementgaidier/tp2front +answer: You called at : 2018-11-13 14:32:08.315980 (dynamic) + On environment : dev (from env variable) + With path : write (from URL path) + With front : 8f0ff760d00d (from real hostname of front service) + With back : 59e6de57fb02 (from real hostname of back service) ## 2.1 command: From 4f004e3a1e41fcb84444a9aa8601981e0812b85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Tue, 13 Nov 2018 15:46:30 +0100 Subject: [PATCH 13/16] docker-compose.yml --- app/docker-compose.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/docker-compose.yml diff --git a/app/docker-compose.yml b/app/docker-compose.yml new file mode 100644 index 0000000..5623493 --- /dev/null +++ b/app/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3' +services: + tp2back: + image: 9e4ba5d15d97 + ports: + - "8080:8080" + environment: + - ENVIRONMENT=dev + tp2front: + image: 80646dee17d5 + ports: + - "8081:8081" + environment: + - APP_PORT=8081 + - WS_BACK_URL=172.17.0.1 From fa4d9a0e9c199e3fe609e0ddbaae512cd73d1c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Tue, 13 Nov 2018 15:50:55 +0100 Subject: [PATCH 14/16] question 2.1 --- answers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/answers.md b/answers.md index 3a02706..dc34400 100644 --- a/answers.md +++ b/answers.md @@ -52,7 +52,7 @@ answer: You called at : 2018-11-13 14:32:08.315980 (dynamic) With back : 59e6de57fb02 (from real hostname of back service) ## 2.1 -command: +command: docker-compose up ## 2.6 command: From 99d13bddde00f7ad8ddca315924f86d1ef3d6b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Tue, 13 Nov 2018 16:58:22 +0100 Subject: [PATCH 15/16] maj --- answers.md | 4 ++-- app/docker-compose.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/answers.md b/answers.md index dc34400..dc8c196 100644 --- a/answers.md +++ b/answers.md @@ -55,7 +55,7 @@ answer: You called at : 2018-11-13 14:32:08.315980 (dynamic) command: docker-compose up ## 2.6 -command: -command: +command: docker-compose up -d +command: docker-compose logs diff --git a/app/docker-compose.yml b/app/docker-compose.yml index 5623493..6ace323 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -13,3 +13,6 @@ services: environment: - APP_PORT=8081 - WS_BACK_URL=172.17.0.1 +volumes: + data: + external: true From 719a275d68ecc5aaaac201b768026cc181241a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GAIDIER?= Date: Thu, 22 Nov 2018 10:26:07 +0100 Subject: [PATCH 16/16] .... --- answers.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/answers.md b/answers.md index dc8c196..38fd735 100644 --- a/answers.md +++ b/answers.md @@ -58,4 +58,7 @@ command: docker-compose up command: docker-compose up -d command: docker-compose logs +## 2.9 +command: +