diff --git a/Dockerfile b/Dockerfile index 0ad2359..3b63a71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM python:3.10-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 +ENV PYTHONPATH=/app # Set work directory WORKDIR /app @@ -24,4 +25,4 @@ ENV FLASK_APP=app.py ENV FLASK_ENV=production # Run the application with gunicorn -CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"] \ No newline at end of file +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--chdir", "/app", "app:app"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 2c9a1f7..18ceace 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,6 @@ services: - FLASK_APP=app.py - FLASK_ENV=production - DATABASE_URL=postgresql://postgres:postgres@db:5432/verpotjelot - volumes: - - .:/app depends_on: - db restart: unless-stopped