diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..4a1c39c --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,5 @@ +fly.toml +.git/ +__pycache__/ +.envrc +.venv/ diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..d8dd2d7 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.11 AS builder + +ENV PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 +WORKDIR /app + +RUN python -m venv .venv +COPY pyproject.toml ./ +RUN .venv/bin/pip install . +FROM python:3.11-slim +WORKDIR /app +COPY --from=builder /app/.venv .venv/ +COPY . . +CMD ["/app/.venv/bin/fastapi", "run"] diff --git a/backend/fly.toml b/backend/fly.toml new file mode 100644 index 0000000..ab0996e --- /dev/null +++ b/backend/fly.toml @@ -0,0 +1,23 @@ +# fly.toml app configuration file generated for flowdeck on 2026-04-23T18:20:50Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'flowdeck' +primary_region = 'sjc' + +[build] + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 + memory_mb = 256