File tree Expand file tree Collapse file tree 6 files changed +79
-0
lines changed Expand file tree Collapse file tree 6 files changed +79
-0
lines changed Original file line number Diff line number Diff line change
1
+ .git /
2
+ target /
3
+ temp /
4
+ .env
Original file line number Diff line number Diff line change
1
+ # https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2
+ name : Fly Deploy
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - master
8
+
9
+ jobs :
10
+ deploy :
11
+ name : Deploy app
12
+ runs-on : ubuntu-latest
13
+ concurrency : deploy-group # ensure only one action runs at a time
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ - uses : superfly/flyctl-actions/setup-flyctl@master
17
+ - run : flyctl deploy --remote-only --image-label $(git rev-parse HEAD)
18
+ env :
19
+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -18,6 +18,30 @@ git push heroku
18
18
```
19
19
20
20
21
+ ## fly.io configuration
22
+ * First time
23
+ ``` sh
24
+ yay -S flyctl-bin
25
+ fly secrets set KEY=VALUE
26
+ fly launch
27
+ ```
28
+
29
+ * Deploy from local
30
+ ``` sh
31
+ fly deploy --image-label $( git rev-parse HEAD)
32
+ ```
33
+
34
+ * Deploy from github
35
+ https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
36
+ See .github/workflows/fly.yml
37
+ ` FLY_API_TOKEN ` - get using ` fly tokens create deploy -x 999999h `
38
+
39
+ * Get git commit hash for current release
40
+ ``` sh
41
+ fly image show # column TAG
42
+ ```
43
+
44
+
21
45
## Needed environment variables
22
46
From https://github.com/settings/apps/factorio-mods-localization-helper :
23
47
* ` GITHUB_APP_ID ` - App ID
Original file line number Diff line number Diff line change
1
+ FROM rust AS builder
2
+ COPY . .
3
+ RUN cargo build --release
4
+
5
+ FROM archlinux
6
+ RUN pacman -Sy --noconfirm git && rm -rf /var/cache/pacman/pkg/*
7
+ COPY --from=builder ./target/release/fml ./target/release/fml
8
+ COPY --from=builder Rocket.toml Rocket.toml
9
+ ENV RUST_BACKTRACE 1
10
+ CMD ["/target/release/fml" ]
Original file line number Diff line number Diff line change 1
1
[release ]
2
2
address = " 0.0.0.0"
3
3
cli_colors = false
4
+ port = 8080
Original file line number Diff line number Diff line change
1
+ # fly.toml app configuration file generated for factorio-mods-localization on 2024-03-25T23:19:01+03:00
2
+ #
3
+ # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4
+ #
5
+
6
+ app = " factorio-mods-localization"
7
+ primary_region = " waw"
8
+
9
+ [http_service ]
10
+ internal_port = 8080
11
+ force_https = true
12
+ auto_stop_machines = false
13
+ auto_start_machines = true
14
+ min_machines_running = 1
15
+ processes = [" app" ]
16
+
17
+ [[vm ]]
18
+ cpu_kind = " shared"
19
+ cpus = 1
20
+ memory_mb = 512
21
+ swap_size_mb = 512
You can’t perform that action at this time.
0 commit comments