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
50 changes: 33 additions & 17 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@
# Answers

Nom:
Prénom:
NB:
Nom: Auger
Prénom: Simon
NB: Groupe5

## 1.3
command:
command: docker build -t tp2 back
docker run tp2

## 1.4
answer:
command:
answer: Le port n'est pas ouvert.
command: docker run -p 8080:8080 tp2

## 1.5
command:
command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2

## 1.6
answer:
command:
answer: pas d'erreur
command: export DOCKER_ID_USER="sauger92"
docker tag tp2 $DOCKER_ID_USER/tp2
docker push $DOCKER_ID_USER/tp2

## 1.7
answer:
command:
command:
command:
answer: le tag devient sauger92/tp2 au lieu de tp2
command: docker images -a
docker rmi 3911263c1b97 -f
command: docker pull sauger92/tp2
command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev sauger92/tp2

## 1.8
answer:
command:
command:
answer: Avec docker ps on a la lister des container actifs. Son nom est quirky_banach
command: docker ps
command: docker rename quirky_banach tp2_container

## 1.9
answer: Debian GNU/Linux 9
answer:
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:
docker run -d -p 8081:8081 -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 $DOCKER_ID_USER/tp2front

## 2.1
command:
docker-compose run service-tp2
docker-compose up


## 2.6
command:
Expand Down
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

WORKDIR /usr/src/app

COPY requirements.txt ./

RUN pip install -r requirements.txt

COPY . .

CMD [ "python", "-u", "./webservice.py" ]
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

WORKDIR /usr/src/app

COPY requirements.txt ./

RUN pip install -r requirements.txt

COPY . .

CMD [ "python", "-u", "./front.py" ]
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'
services:
service-back:
image: sauger92/tp2
ports:
- "8080:8080"
environment:
- ENVIRONMENT=dev
service-front:
image: sauger92/tp2front
ports:
- "8081:8081"
environment:
- APP_PORT=8081
- WS_BACK_URL=172.17.0.1
Loading