From 0610bb7fdf34f3dd9ac2a24b374abddbdc3cec01 Mon Sep 17 00:00:00 2001 From: Blake Ridgway Date: Thu, 13 Feb 2025 19:14:45 +0000 Subject: [PATCH] (feat): Added production level deployment --- Dockerfile | 15 +++++++++++---- requirements.txt | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 588c148..d93dc05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,19 @@ -FROM python:3.11-slim +FROM python:3.11-slim-buster -WORKDIR /admin-panel +# Install build dependencies (build-essential provides gcc and other tools) +RUN apt-get update && apt-get install -y build-essential + +WORKDIR /rideaware_landing + +COPY requirements.txt . -COPY requirements.txt RUN pip install --no-cache-dir -r requirements.txt COPY . . +ENV FLASK_APP=server.py + EXPOSE 5001 -CMD ["python", "app.py"] \ No newline at end of file +CMD ["gunicorn", "--bind", "0.0.0.0:5001", "app:app"] + diff --git a/requirements.txt b/requirements.txt index 536c5d0..26fcaf5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ +gunicorn flask python-dotenv Werkzeug -psycopg2-binary \ No newline at end of file +psycopg2-binary