Skip to content

Commit 00af137

Browse files
committed
chore: reorder deployment story
1 parent 5b8e99c commit 00af137

1 file changed

Lines changed: 39 additions & 3 deletions

File tree

Fly.io.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,57 @@ Apps that are shutdown but persist on Fly.io accumulate a RootFS storage fee of
2121

2222
An example deployment flow using `fly.io` for a Ruby on Rails app.
2323

24+
### Initialization
25+
26+
Although fly.io can create deploy an application from a repository with a single command (`flyctl launch`), this reduces the amount of customisation available.
27+
Additionally, often secrets that are required for the Rails app to boot will not be present in the initial Docker machine image that fly.io will create and changes will be needed.
28+
Instead, an application can be registered using:
29+
30+
```bash
31+
fly apps create APP_NAME
32+
```
33+
34+
This will create an instance of an application with no machines attached.
35+
2436
### Integrating secrets
2537

26-
`flyctl launch --no-deploy`
38+
Secrets can be added to an application without redeploying using the staging command:
39+
40+
```bash
41+
fly secrets set SECREY_KEY=secret_value --stage
42+
```
2743

2844
Add TAILSCALE_AUTHKEY secret
2945
Add RAILS_SECRET_KEY_BASE secret
3046

31-
`flyctl deploy`
47+
### Attaching services
48+
49+
50+
51+
### Build configuration
52+
53+
### Launching
54+
55+
56+
`fly deploy` will automatically provision 2 machines.
57+
Specifying false high availability will reduce this to one—this is beneficial for non-production environments.
58+
There does not appear to be a `fly.toml` configuration for this.
59+
60+
```bash
61+
flyctl deploy --ha=false
62+
```
63+
64+
65+
```bash
66+
flyctl launch --no-deploy
67+
```
68+
3269

3370
https://community.fly.io/t/setting-secrets-before-the-first-deployment-does-nothing/5589/7
3471

3572

3673
### Runtime secrets
3774

38-
3975
### Networking
4076

4177
Apps created with Fly.io are immediately assigned an IP address and provided with a `.fly.dev` domain name.

0 commit comments

Comments
 (0)