Skip to content

Commit ee43ada

Browse files
ci: deploy to fly
1 parent c4275c6 commit ee43ada

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# flyctl launch added from .gitignore
2+
**/.dart_tool
3+
fly.toml

.github/workflows/deploy.yml

+7-20
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,12 @@ on:
77

88
jobs:
99
job_001:
10+
name: Deploy
1011
runs-on: ubuntu-latest
12+
concurrency: deploy-group
1113
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v3
14-
15-
- name: Login to Docker hub
16-
uses: docker/login-action@v2
17-
with:
18-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
19-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
20-
21-
- name: Setup build
22-
uses: docker/setup-buildx-action@v2
23-
24-
- name: Build and push
25-
uses: docker/build-push-action@v3
26-
with:
27-
context: .
28-
file: ./packages/architect_server/Dockerfile
29-
push: true
30-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/architect:main
31-
target: prod
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 }}

fly.toml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
app = 'architect'
2+
primary_region = 'ams'
3+
4+
[build]
5+
dockerfile = './packages/architect_server/Dockerfile'
6+
7+
[http_service]
8+
internal_port = 8080
9+
force_https = true
10+
auto_stop_machines = true
11+
auto_start_machines = true
12+
min_machines_running = 0
13+
processes = ['app']
14+
15+
[[http_service.checks]]
16+
grace_period = "10s"
17+
interval = "30s"
18+
method = "GET"
19+
timeout = "5s"
20+
path = "/_internal_/healthcheck"
21+
22+
[[vm]]
23+
memory = '1gb'
24+
cpu_kind = 'shared'
25+
cpus = 1

0 commit comments

Comments
 (0)