Skip to content

Commit 915bd79

Browse files
committed
Move deployment to fly.io
1 parent 8d0ca1d commit 915bd79

File tree

2 files changed

+58
-7
lines changed

2 files changed

+58
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ jobs:
7373
sha_tag=$(echo "${{ steps.meta.outputs.tags }}" | grep -o 'sha-[^[:space:]]*' | head -n 1)
7474
echo "sha_tag=$sha_tag" >> $GITHUB_OUTPUT
7575
76-
- name: Deploy to Bunny
77-
uses: BunnyWay/actions/container-update-image@container-update-image_0.1.2
78-
with:
79-
app_id: ${{ vars.BUNNY_APP_ID }}
80-
api_key: ${{ secrets.BUNNY_API_KEY }}
81-
container: TestServer
82-
image_tag: "${{ steps.extract-sha.outputs.sha_tag }}"
76+
- name: Install flyctl
77+
uses: superfly/flyctl-actions/setup-flyctl@master
78+
- name: Deploy to fly.io
79+
run: flyctl deploy --remote-only
80+
env:
81+
FLY_API_TOKEN: ${{ secrets.FLY_DEPLOY_KEY }}

fly.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
2+
3+
app = 'testserver-host'
4+
primary_region = 'cdg'
5+
6+
[build]
7+
image = 'httptoolkit/testserver:latest'
8+
9+
[env]
10+
PORTS = '8080'
11+
CERT_CACHE_DIR = '/usr/src/app/cert_dir'
12+
13+
# If deploying a separate instance and wanting real certificates, customize these:
14+
ROOT_DOMAIN = 'testserver.host'
15+
PROACTIVE_CERT_DOMAINS = 'testserver.host,example.testserver.host,http1.testserver.host,http2.testserver.host'
16+
17+
ACME_PROVIDER = 'zerossl' # or 'letsencrypt'
18+
# For zerossl you'll need to set ACME_EAB_HMAC and ACME_EAB_KID secrets for auth
19+
20+
[[services]]
21+
protocol = "tcp"
22+
internal = 8080
23+
24+
[[services.ports]]
25+
port = "80"
26+
[[services.ports]]
27+
port = "443"
28+
[[services.ports]]
29+
start_port = 8000
30+
end_port = 10000
31+
32+
# Continually check /echo can return a valid HTTPS response
33+
[[services.http_checks]]
34+
interval = 10000
35+
grace_period = "5s"
36+
method = "get"
37+
path = "/echo"
38+
protocol = "https"
39+
timeout = 2000
40+
tls_server_name = "testserver.host"
41+
tls_skip_verify = true # We don't verify by default, so this works for fresh empty-volume deploys
42+
43+
# If we want to scale out within a single region, where there's already an app in the same region
44+
# using this volume, we need to fork it and create another with the same name.
45+
[mounts]
46+
source = "cert_data"
47+
destination = "/usr/src/app/cert_dir"
48+
49+
[[vm]]
50+
memory = '256mb'
51+
cpu_kind = 'shared'
52+
cpus = 1

0 commit comments

Comments
 (0)