From c249c31b8f7d1faba12a9f944727cb66115fd3bf Mon Sep 17 00:00:00 2001 From: Blake Ridgway Date: Thu, 13 Feb 2025 19:14:07 +0000 Subject: [PATCH] (feat): Added production level deployment --- Dockerfile | 7 +++++-- requirements.txt | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index da90ed6..fed12b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM python:3.11-slim-buster +RUN apt-get update && apt-get install -y build-essential + WORKDIR /rideaware_landing -COPY requirements.txt requirements.txt +COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt @@ -12,4 +14,5 @@ ENV FLASK_APP=server.py EXPOSE 5000 -CMD [ "python3", "-m", "flask", "run", "--host=0.0.0.0"] +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "server:app"] + diff --git a/requirements.txt b/requirements.txt index e4b25c7..68767e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +gunicorn flask python-dotenv -psycopg2-binary \ No newline at end of file +psycopg2-binary