From e0349ab05805f8c0f58f5952e011e52e70cd26ac Mon Sep 17 00:00:00 2001 From: Stef Date: Sun, 31 Aug 2025 12:18:08 +0200 Subject: [PATCH] Set up docker auto build, copied from another project --- DockerFile | 17 +++++++++++++++++ main.py => app.py | 0 entrypoint.sh | 8 ++++++++ 3 files changed, 25 insertions(+) create mode 100644 DockerFile rename main.py => app.py (100%) create mode 100644 entrypoint.sh diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000..ddaec8e --- /dev/null +++ b/DockerFile @@ -0,0 +1,17 @@ +FROM python:3.12-slim + +# Everything will be done in /app (Not in the main OS Image) +WORKDIR /app + +COPY requirements.txt . + +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +RUN chmod +x ./entrypoint.sh + +ENV FLASK_APP=app.py + +ENTRYPOINT ["./entrypoint.sh"] +CMD [] \ No newline at end of file diff --git a/main.py b/app.py similarity index 100% rename from main.py rename to app.py diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..1e5ec8c --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -ex + +#echo "Running database migrations..." +#flask db upgrade + +echo "Starting Flask app..." +python app.py \ No newline at end of file