File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 - name : Build deploy image
3737 run : docker build -t anchr:${{ github.sha }} .
3838
39- deploy :
40- name : Deploy To Fly.io
39+ deploy-infra :
40+ name : Deploy ${{ matrix.app }}
4141 needs : ci
4242 runs-on : ubuntu-latest
4343 timeout-minutes : 30
4747 (github.event_name == 'push' &&
4848 github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
4949 }}
50+ concurrency :
51+ group : fly-${{ matrix.app }}
52+ cancel-in-progress : true
53+ permissions :
54+ contents : read
55+ environment :
56+ name : production
57+
58+ strategy :
59+ fail-fast : false
60+ matrix :
61+ include :
62+ - app : relay
63+ config : fly.relay.toml
64+ - app : blossom
65+ config : fly.blossom.toml
66+
67+ steps :
68+ - name : Checkout
69+ uses : actions/checkout@v4
70+
71+ - name : Setup Flyctl
72+ uses : superfly/flyctl-actions/setup-flyctl@master
73+
74+ - name : Deploy ${{ matrix.app }}
75+ run : flyctl deploy --remote-only --config ${{ matrix.config }}
76+ env :
77+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
78+
79+ deploy-app :
80+ name : Deploy Anchr App
81+ needs : deploy-infra
82+ runs-on : ubuntu-latest
83+ timeout-minutes : 30
5084 concurrency :
5185 group : fly-production
5286 cancel-in-progress : true
Original file line number Diff line number Diff line change 1+ FROM ghcr.io/hzrd149/blossom-server:master
2+
3+ COPY blossom-config.yml /app/config.yml
4+
5+ EXPOSE 3000
Original file line number Diff line number Diff line change 1+ app = " anchr-blossom"
2+ primary_region = " nrt"
3+
4+ [build ]
5+ dockerfile = " Dockerfile.blossom"
6+
7+ [deploy ]
8+ wait_timeout = " 5m"
9+
10+ [[mounts ]]
11+ source = " blossom_data"
12+ destination = " /app/data"
13+
14+ [http_service ]
15+ internal_port = 3000
16+ force_https = true
17+ auto_stop_machines = " stop"
18+ auto_start_machines = true
19+ min_machines_running = 0
20+ processes = [" app" ]
21+
22+ [[vm ]]
23+ cpu_kind = " shared"
24+ cpus = 1
25+ memory_mb = 512
Original file line number Diff line number Diff line change 1+ app = " anchr-relay"
2+ primary_region = " nrt"
3+
4+ [build ]
5+ image = " scsibug/nostr-rs-relay:latest"
6+
7+ [deploy ]
8+ wait_timeout = " 5m"
9+
10+ [[mounts ]]
11+ source = " relay_data"
12+ destination = " /usr/src/app/db"
13+
14+ [http_service ]
15+ internal_port = 8080
16+ force_https = true
17+ auto_stop_machines = " stop"
18+ auto_start_machines = true
19+ min_machines_running = 0
20+ processes = [" app" ]
21+
22+ [[vm ]]
23+ cpu_kind = " shared"
24+ cpus = 1
25+ memory_mb = 512
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ primary_region = "nrt"
1010[env ]
1111 REFERENCE_APP_PORT = " 8080"
1212 RUNTIME_DATA_DIR = " /data"
13+ NOSTR_RELAYS = " wss://anchr-relay.fly.dev"
14+ BLOSSOM_SERVERS = " https://anchr-blossom.fly.dev"
1315
1416[[mounts ]]
1517 source = " data"
You can’t perform that action at this time.
0 commit comments