forked from onetimesecret/onetimesecret
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fly.toml
121 lines (107 loc) · 3.81 KB
/
fly.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# fly.toml app configuration file generated 2024-04-26T14:34:31-07:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
#### Deploying Examples
#
# fly apps create <app-name>
# fly secrets set SECRET=$secret
# fly secrets set REDIS_URI=$uri
# fly machine list
# fly machine start
# fly scale count --app <app-name> 0
# fly scale count 0
# fly logs -a <app-name>
#
# fly scale count 1 --region ord
#
# fly apps create <redis-app-name>
# fly secrets set REDIS_PASSWORD=$pass
# fly volumes create redis_staging
app = 'ots-staging-ui'
primary_region = 'ams'
[build]
#image = 'ghcr.io/onetimesecret/onetimesecret:v0.16.1-RC1'
dockerfile = 'Dockerfile' # builds the current local state (incl etc/config)
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[http_service.http_options.response.headers]
Onetime-Env = 'staging'
Onetime-Region = 'ams'
[[vm]]
size = 'shared-cpu-1x'
memory = '1GB'
cpu_kind = 'shared'
cpus = 1
# https://fly.io/docs/reference/configuration/#swap_size_mb-option
swap_size_mb = 512
[deploy]
# Run a command on a temp machine deploying the app.
#
# Blue-Green strategy for zero downtime deployments, but
# only works for machines with no volumes attached.
#
# You need to define at least 1 check in order to use blue-green deployments. Refer to https://fly.io/docs/reference/configuration/#services-tcp_checks
#
# Otherwise this error:
# Deployment failed after error: app not in valid state for bluegreen deployments
#strategy = 'bluegreen'
[[http_service.checks]]
grace_period = '5s'
interval = '20s'
timeout = '5s'
protocol = 'http'
port = 3000
method = 'GET'
path = '/'
# Ask the Fly.io platform to serve our static assets. When it sees
# this config, it'll fish out the static assets from the container
# and serve them directly from their proxies at the url_prefix
# specified. This is faster and eliminates having to package an
# HTTP server into your container.
[[statics]]
guest_path = '/app/public'
url_prefix = '/static'
[env]
SSL = 'true'
RACK_ENV = 'production'
EMAILER_MODE = 'smtp'
##
# RE: private networking between machines
#
# @see https://fly.io/docs/networking/private-networking/#
#
# Applications within the same organization are assigned special addresses
# (6PN addresses) tied to the organization. Those applications can talk to
# each other because of those 6PN addresses, but applications from other
# organizations can't; the Fly.io platform won't forward between different
# 6PN networks.
#
# This connectivity is always available to apps; you don't have to do
# anything special to get it.
#
# You can connect apps running outside of Fly.io to your 6PN network
# using WireGuard; for that matter, you can connect your dev laptop to
# your 6PN network. To do that, you'll use flyctl, the Fly.io CLI, to
# generate a WireGuard configuration that has a 6PN address.
#
# dig +noall +answer _apps.internal txt
# dig +short aaaa ots-staging-ui.internal @fdaa::3
# dig +short aaaa ots-staging-redis.internal @fdaa::3
##
# RE: volumes and mounts
# @see https://fly.io/docs/reference/volumes/
#
# To prevent a single server hardware failure from taking down multiple Fly Machines, it is better if each volume you create for your app is placed in a separate hardware zone (i.e. on a different server). This happens by default when using fly volumes create, but is not guaranteed when creating Fly Volumes through other methods.
##
# RE: secrets
# @see https://fly.io/docs/reference/secrets/#setting-secrets
#
# To set, or update, a secret in the app’s vault, but defer updating the Machines to later, use the --stage option. For example:
#
# fly secrets set DATABASE_URL=postgres://example.com/mydb --stage