From 3c540e502dc9ad4d155eb94ef262c5b1b3ce8c2d Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 24 Jan 2026 16:52:12 -0500 Subject: [PATCH] switch to gunicorn --- Dockerfile | 15 +++++---------- app.py | 2 +- requirements.txt | 3 ++- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index e26f5b9..03f886b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,14 @@ -# Dockerfile for 'Are We Buried?' FROM python:3.12-slim -# Set environment -ENV PYTHONUNBUFFERED=1 WORKDIR /app -# Install dependencies -COPY requirements.txt ./ +COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# Copy application code -COPY . /app +COPY app.py . +COPY templates ./templates +COPY static ./static -# Expose the Flask port EXPOSE 5000 -# Run the Flask app -CMD ["python", "app.py"] \ No newline at end of file +CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"] \ No newline at end of file diff --git a/app.py b/app.py index a7e5866..874c938 100644 --- a/app.py +++ b/app.py @@ -189,4 +189,4 @@ def snowfall_api(): if __name__ == "__main__": - app.run(debug=True) \ No newline at end of file + app.run(host="0.0.0.0", port=5000) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5eaf725..4287cd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ flask -requests \ No newline at end of file +requests +gunicorn \ No newline at end of file