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