diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4a1c39c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +fly.toml +.git/ +__pycache__/ +.envrc +.venv/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fa86cf8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.13.1 AS builder + +ENV PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 +WORKDIR /app + + +RUN python -m venv .venv +COPY requirements.txt ./ +RUN .venv/bin/pip install -r requirements.txt +FROM python:3.13.1-slim +WORKDIR /app +COPY --from=builder /app/.venv .venv/ +COPY . . +CMD ["/app/.venv/bin/flask", "run", "--host=0.0.0.0", "--port=8080"] diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..0defc87 --- /dev/null +++ b/fly.toml @@ -0,0 +1,20 @@ +# fly.toml app configuration file generated for tornactivitytracker on 2025-02-11T02:59:23+01:00 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'tornactivitytracker' +primary_region = 'fra' + +[build] + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + size = 'shared-cpu-2x'