From 0e4c6b5d40b0b7e1fb93af271a8cf0c7993fabf6 Mon Sep 17 00:00:00 2001 From: shillerben Date: Mon, 25 Jan 2021 20:18:25 -0600 Subject: [PATCH] Got docker-compose.yaml to work --- Dockerfile | 3 ++- docker-compose.yml | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0bb9921..b908a12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.8 -WORKDIR /usr/src/app +WORKDIR /app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt @@ -11,3 +11,4 @@ ENV FLASK_ENV production COPY . . CMD ["gunicorn", "-b", "0.0.0.0:5000", "my_homepage:create_app()"] +#CMD ["gunicorn", "-b", "127.0.0.1:5000", "my_homepage:create_app()"] diff --git a/docker-compose.yml b/docker-compose.yml index 43e035d..d088821 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,10 @@ -version: '3' +version: '3.9' services: - app: - image: my_homepage + web: + build: . restart: unless-stopped + volumes: + - .:/app + ports: + - "5000:5000"