Skip to content

Commit 066ccd5

Browse files
authored
Merge pull request #2 from alflanagan/update_fly_setup
Update fly setup
2 parents 2db8a81 + 2642803 commit 066ccd5

File tree

5 files changed

+38
-43
lines changed

5 files changed

+38
-43
lines changed

.github/workflows/fly-deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2+
3+
name: Fly Deploy
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 }}

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ COPY app /app/
3838

3939
RUN pip install --no-cache-dir uv==0.7.12 && \
4040
uv sync --frozen
41+
42+
# do I need to set up the database for fly?
43+
CMD ["make", "run-server"]

app/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PYTHON=uv run python
1+
PYTHON=uv run --link-mode=copy python
22

33
run-server:
44
$(PYTHON) manage.py migrate
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div id="copyright" class="card">
22
<div class="p-1 text-dark card-body">
3-
<p class="card-text">© A Lloyd Flanagan 2023 License GPL3.</p>
3+
<p class="card-text">© A Lloyd Flanagan 2025 License GPL3.</p>
44
</div>
55
</div>

fly.toml

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,22 @@
1-
# fly.toml app configuration file generated for alloydflanagan-web on 2023-10-01T14:12:59-04:00
1+
# fly.toml app configuration file generated for alloydflanagan-wag on 2025-06-11T16:03:48-04:00
22
#
33
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44
#
55

6-
app = "alloydflanagan-web"
7-
primary_region = "iad"
8-
kill_signal = "SIGINT"
9-
kill_timeout = "5s"
10-
console_command = "/code/manage.py shell"
11-
12-
[experimental]
13-
auto_rollback = true
6+
app = 'alloydflanagan-wag'
7+
primary_region = 'iad'
148

159
[build]
1610

17-
[deploy]
18-
release_command = "python manage.py migrate"
19-
20-
[env]
21-
PORT = "8000"
22-
23-
[[services]]
24-
protocol = "tcp"
25-
internal_port = 8000
26-
processes = ["app"]
27-
28-
[[services.ports]]
29-
port = 80
30-
handlers = ["http"]
31-
force_https = true
32-
33-
[[services.ports]]
34-
port = 443
35-
handlers = ["tls", "http"]
36-
[services.concurrency]
37-
type = "connections"
38-
hard_limit = 25
39-
soft_limit = 20
40-
41-
[[services.tcp_checks]]
42-
interval = "15s"
43-
timeout = "2s"
44-
grace_period = "1s"
45-
46-
[[statics]]
47-
guest_path = "/code/static"
48-
url_prefix = "/static/"
11+
[http_service]
12+
internal_port = 8080
13+
force_https = true
14+
auto_stop_machines = 'suspend'
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

0 commit comments

Comments
 (0)