File tree Expand file tree Collapse file tree 5 files changed +56
-2
lines changed Expand file tree Collapse file tree 5 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 2121.pytest_cache
2222
2323html /*
24-
24+ fly.toml
2525__pycache__
Original file line number Diff line number Diff line change 1+ # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2+
3+ name : Norebase challenge API Fly Deployment
4+ on :
5+ push :
6+ branches :
7+ - main
8+ jobs :
9+ deploy :
10+ name : Deploy app
11+ runs-on : ubuntu-latest
12+ concurrency : deploy-group # optional: ensure only one action runs at a time
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : superfly/flyctl-actions/setup-flyctl@master
16+ - run : flyctl deploy --remote-only
17+ env :
18+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
Original file line number Diff line number Diff line change 1+ FROM python:3.12.7 AS builder
2+
3+ ENV PYTHONUNBUFFERED=1 \
4+ PYTHONDONTWRITEBYTECODE=1
5+ WORKDIR /app
6+
7+
8+ RUN python -m venv .venv
9+ COPY requirements.txt ./
10+ RUN .venv/bin/pip install -r requirements.txt
11+ FROM python:3.12.7-slim
12+ WORKDIR /app
13+ COPY --from=builder /app/.venv .venv/
14+ COPY . .
15+ CMD alembic upgrade heads && /app/.venv/bin/fastapi run
Original file line number Diff line number Diff line change 1+ # fly.toml app configuration file generated for norebase-challenge on 2024-11-02T20:31:20+01:00
2+ #
3+ # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4+ #
5+
6+ app = ' norebase-challenge'
7+ primary_region = ' ams'
8+
9+ [build ]
10+
11+ [http_service ]
12+ internal_port = 8000
13+ force_https = true
14+ auto_stop_machines = ' stop'
15+ auto_start_machines = true
16+ min_machines_running = 0
17+ processes = [' app' ]
18+
19+ [[vm ]]
20+ memory = ' 1gb'
21+ cpu_kind = ' shared'
22+ cpus = 1
Original file line number Diff line number Diff line change 11alembic == 1.13.3
22annotated-types == 0.7.0
33anyio == 4.6.2.post1
4- bcrypt == 4.2.0
54certifi == 2024.8.30
65click == 8.1.7
76dnspython == 2.7.0
You can’t perform that action at this time.
0 commit comments