diff --git a/Dockerfile b/docker/Dockerfile similarity index 64% rename from Dockerfile rename to docker/Dockerfile index b779123..2c79e78 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -10,4 +10,4 @@ COPY . . EXPOSE 5000 -CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"] +CMD ["gunicorn", "--preload", "-w", "4", "-b", "0.0.0.0:5000", "app:app"] diff --git a/docker-compose.yml b/docker/docker-compose.yml similarity index 50% rename from docker-compose.yml rename to docker/docker-compose.yml index c54d7f8..36154d7 100644 --- a/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,9 +1,11 @@ services: flask-api: - build: . + build: + context: ../src + dockerfile: ../docker/Dockerfile ports: - 5000:5000 environment: FLASK_ENV: production volumes: - - ./instance:/app/instance + - ../instance:/app/instance diff --git a/run.bat b/run.bat index d50d8f8..e731085 100644 --- a/run.bat +++ b/run.bat @@ -2,5 +2,5 @@ python -m venv .venv call .venv\Scripts\activate -pip install -r requirements.txt -python app.py \ No newline at end of file +pip install -r src\requirements.txt +python src\app.py \ No newline at end of file diff --git a/run.sh b/run.sh index 4210f5a..7f49a28 100644 --- a/run.sh +++ b/run.sh @@ -2,5 +2,5 @@ python -m venv .venv source .venv/bin/activate -pip install -r requirements.txt -python app.py \ No newline at end of file +pip install -r src/requirements.txt +python src/app.py \ No newline at end of file diff --git a/.env.dev b/src/.env.dev similarity index 100% rename from .env.dev rename to src/.env.dev diff --git a/api.py b/src/api.py similarity index 100% rename from api.py rename to src/api.py diff --git a/app.py b/src/app.py similarity index 100% rename from app.py rename to src/app.py diff --git a/db.py b/src/db.py similarity index 100% rename from db.py rename to src/db.py diff --git a/requirements.txt b/src/requirements.txt similarity index 100% rename from requirements.txt rename to src/requirements.txt diff --git a/templates/index.html b/src/templates/index.html similarity index 100% rename from templates/index.html rename to src/templates/index.html