Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 37 additions & 21 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,62 @@
# Answers

Nom:
Prénom:
NB:
Nom: Kourganoff
Prénom: Adrien
NB: 7

## 1.3
command:
command: docker build -t my-python-app .
docker run NOM_IMAGE

## 1.4
answer:
command:
answer: le port n'est pas ouvert
command: docker run --rm -p 8080:8080 my-python-app

## 1.5
command:
command: docker run -e ENVIRONMENT='dev' --rm -p 8080:8080 my-python-app

## 1.6
answer:
command:
answer: parce que il 'y a pas de tag
command: docker tag my-python-app yrandill/my-python-app
docker push yrandill/my-python-app

## 1.7
answer:
command:
command:
command:
command: docker image rm NOM_IMAGE
command: docker pull yrandill/my-python-app
command: docker run -e ENVIRONMENT='dev' --rm -d -p 8080:8080 yrandill/my-python-app

## 1.8
answer:
command:
command:
answer: nom = admiring_panini
command: docker ps
command: docker run -e ENVIRONMENT='dev' --rm --name tp2-back -d -p 8080:8080 yrandill/my-python-app

## 1.9
answer:
answer:
answer: Debian
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:
command: docker run -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 --rm --name tp2-front -d -p 8081:8081 tp2-front
answer: You called at : 2018-11-13 16:55:48.526342 (dynamic)
On environment : 'dev' (from env variable)
With path : path_Test (from URL path)
With front : 184f92d4447d (from real hostname of front service)
With back : 8e9c0fe597b4 (from real hostname of back service)

## 2.1
command:
command: docker-compose up

## 2.6
command:
command:
command: docker-compose up -d
command: docker-compose logs

## 2.9
command : docker-compose up -d —scale launchBack=2

11 changes: 11 additions & 0 deletions app/back/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.7.1-stretch

WORKDIR /

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD [ "python", "-u", "./webservice.py" ]

20 changes: 20 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'
services:
launchBack:
image: yrandill/my-python-app
environment:
- ENVIRONMENT='dev'
# volumes:
# - logs
launchFront:
image: yrandill/tp2-front
ports:
- "8081:8081"
environment:
- APP_PORT=8081
- WS_BACK_URL=back
links:
-"launchBack:back"

# volumes:
# logs:
11 changes: 11 additions & 0 deletions app/front/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.7.1-stretch

WORKDIR /

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD [ "python", "-u", "./front.py" ]