Skip to content

Commit 5f322b1

Browse files
authored
Merge pull request #3 from joshpollara/migrate-to-fly
Migrate from Render to Fly.io
2 parents 3f9aa2b + 2832ed6 commit 5f322b1

File tree

4 files changed

+83
-27
lines changed

4 files changed

+83
-27
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Deploy to Fly.io
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Deploy to Fly.io
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: superfly/flyctl-actions/setup-flyctl@master
16+
17+
- name: Deploy to Fly.io
18+
run: flyctl deploy --remote-only
19+
env:
20+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3.8'
2+
3+
services:
4+
bridgeping:
5+
build: .
6+
container_name: bridgeping
7+
ports:
8+
- "8000:8000"
9+
volumes:
10+
- ./data:/app/data
11+
restart: unless-stopped
12+
environment:
13+
- TZ=Europe/Amsterdam
14+
- DATABASE_PATH=/app/data/bridgeping.db
15+
- JWT_SECRET_KEY=${JWT_SECRET_KEY:-J9DrjsnyekiT+fGVOtWIYHybcxREWQBlEhpwDoLd/NU=}

fly.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
app = "bridgeping"
2+
primary_region = "ams"
3+
kill_signal = "SIGINT"
4+
kill_timeout = 5
5+
6+
[build]
7+
8+
[env]
9+
DATABASE_PATH = "/app/data/bridgeping.db"
10+
TZ = "Europe/Amsterdam"
11+
12+
[mounts]
13+
source = "bridgeping_data"
14+
destination = "/app/data"
15+
16+
[[services]]
17+
internal_port = 8000
18+
protocol = "tcp"
19+
auto_stop_machines = true
20+
auto_start_machines = true
21+
min_machines_running = 0
22+
23+
[[services.ports]]
24+
port = 80
25+
handlers = ["http"]
26+
force_https = true
27+
28+
[[services.ports]]
29+
port = 443
30+
handlers = ["tls", "http"]
31+
32+
[services.concurrency]
33+
type = "connections"
34+
hard_limit = 25
35+
soft_limit = 20
36+
37+
[[services.http_checks]]
38+
interval = "30s"
39+
timeout = "10s"
40+
grace_period = "10s"
41+
method = "GET"
42+
path = "/"
43+
protocol = "http"
44+
tls_skip_verify = false
45+
46+
[metrics]
47+
port = 9091
48+
path = "/metrics"

render.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)