diff --git a/api-backend/Dockerfile b/api-backend/Dockerfile new file mode 100644 index 0000000..27404f9 --- /dev/null +++ b/api-backend/Dockerfile @@ -0,0 +1,5 @@ +FROM python:2.7 +ADD api.py / +EXPOSE 8001 +RUN pip install requests flask +CMD [ "python", "api.py"] \ No newline at end of file diff --git a/api-backend/Dockerfile~ b/api-backend/Dockerfile~ new file mode 100644 index 0000000..26a5cb1 --- /dev/null +++ b/api-backend/Dockerfile~ @@ -0,0 +1,6 @@ +FROM python:2.7 +ADD api.py / +EXPOSE 8001 +RUN apt update +RUN pip install requests flask +CMD [ "python", "api.py"] \ No newline at end of file diff --git a/api-backend/api.py b/api-backend/api.py index ef67ecb..3bb8339 100755 --- a/api-backend/api.py +++ b/api-backend/api.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.7 +#!/usr/local/bin/python2.7 # coding: utf-8 # Author : Alexandre Jauneau diff --git a/api-frontend/#Dockerfile# b/api-frontend/#Dockerfile# new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/api-frontend/#Dockerfile# @@ -0,0 +1 @@ + diff --git a/api-frontend/Dockerfile b/api-frontend/Dockerfile new file mode 100644 index 0000000..ae78865 --- /dev/null +++ b/api-frontend/Dockerfile @@ -0,0 +1,7 @@ +FROM python:2.7 +ADD api.py / +ENV API_BACKEND_URL=185.119.254.201 +ENV API_BACKEND_PORT=8001 +EXPOSE 8000 +RUN pip install requests flask +CMD [ "python", "api.py"] diff --git a/api-frontend/Dockerfile~ b/api-frontend/Dockerfile~ new file mode 100644 index 0000000..a0d3171 --- /dev/null +++ b/api-frontend/Dockerfile~ @@ -0,0 +1,7 @@ +FROM python:2.7 +ADD api.py / +ENV API_BACKEND_URL=127.0.0.1 +ENV API_BACKEND_PORT=8001 +EXPOSE 8000 +RUN pip install requests flask +CMD [ "python", "api.py"] diff --git a/api-frontend/api.py b/api-frontend/api.py index e1698a6..649aec5 100755 --- a/api-frontend/api.py +++ b/api-frontend/api.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.7 +#!/usr/local/bin/python2.7 # coding: utf-8 # Author : Alexandre Jauneau diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4b2437b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3.3" +services: + back-end: + build: api-backend/ + ports: + - "8001:8001" + restart: always + front-end: + build: api-frontend/ + ports: + - "8000:8000" + depends_on: + - back-end diff --git a/docker-compose.yml~ b/docker-compose.yml~ new file mode 100644 index 0000000..96acd00 --- /dev/null +++ b/docker-compose.yml~ @@ -0,0 +1,10 @@ +version: "3.3" +services: + backend: + build: api-backend/ + ports: + - "8001:8001" + front-end: + build: api-frontend/ + ports: + - "8000:8000"