From 82c7f2847c65960e2944a038789bc75ac792466d Mon Sep 17 00:00:00 2001 From: khansadaoudi Date: Fri, 6 Oct 2023 14:43:42 +0200 Subject: [PATCH] Add Dockerfile and docker-compose to the backend --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 18 ++++++++++++++++++ requirements.txt | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fbea679 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# python base image +FROM python:3.8 + +WORKDIR /app + +COPY requirements.txt ./ + +# Installing the requirements +RUN pip install -r requirements.txt + +COPY . . + +# Command to run in the dev mode +CMD ["flask", "run", "--host=0.0.0.0", "--cert=adhoc"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6ef0574 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' +services: + arborator-backend: + container_name: arborator-backend + build: . + image: arborator-backend + ports: + - "5000:5000" + volumes: + - .:/app + environment: + - FLASK_ENV=dev + - FLASK_APP=wsgi.py +networks: + default: + external: + name: external-network + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 4ec0037..8134cb2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,6 +28,7 @@ Flask-Script==2.0.6 Flask-SQLAlchemy==2.4.4 frozenlist==1.3.3 idna==2.10 +importlib-metadata==6.6.0 iniconfig==1.1.1 itsdangerous==1.1.0 jdcal==1.4.1 @@ -71,3 +72,4 @@ uWSGI==2.0.19.1 Werkzeug==1.0.1 XlsxWriter==1.3.7 yarl==1.9.2 +zipp==3.15.0