From 520252bbeef7adaf0b022519f6316a954b73ca20 Mon Sep 17 00:00:00 2001 From: cami Date: Fri, 25 Jun 2021 03:02:44 +0200 Subject: [PATCH] Added backend to prod docker environment --- backend/Dockerfile.prod | 7 ++++--- docker-compose.prod.yml | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile.prod b/backend/Dockerfile.prod index 3eba885..1bd4a72 100644 --- a/backend/Dockerfile.prod +++ b/backend/Dockerfile.prod @@ -1,12 +1,13 @@ FROM python -WORKDIR /opt/demo/ +WORKDIR /app + +RUN apt-get -y update && apt-get -y upgrade COPY requirements.txt . -RUN apt-get -y update && apt-get -y upgrade RUN pip install -r requirements.txt COPY /src . -CMD [ "python", "main.py" ] +CMD [ "python", "app.py" ] diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index b67cb2c..22f54f4 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -8,3 +8,15 @@ services: dockerfile: Dockerfile.prod ports: - 8877:80 + backend-prod: + container_name: backend_bt + build: + context: ./backend + dockerfile: Dockerfile.prod + ports: + - 5000:5000 + environment: + DEBUG: "no" + PORT: 5000 + HOST: "0.0.0.0" +