mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-21 22:51:36 +00:00
This is done using reflection to avoid boilerplate and potential desync of the two configuration interfaces. The `[[wildcards]]` section did not fit well into the "splat every config key" paradigm, so it is unmarshalled as a whole from a JSON payload in an environment variable. This commit also splits up the `Config` type into small per-section struct types and removes most references to the global `config` in favor of passing pointers to sections around. A new option, `-print-config-env-vars`, shows the names and types of all of the available configuration knobs.
59 lines
1.2 KiB
TOML
59 lines
1.2 KiB
TOML
# Requires secrets to be set:
|
|
# - ACME_EMAIL
|
|
# - PAGES_CONFIG_FILE
|
|
# - PAGES_STORAGE_S3_ENDPOINT
|
|
# - PAGES_STORAGE_S3_ACCESS_KEY_ID
|
|
# - PAGES_STORAGE_S3_SECRET_ACCESS_KEY
|
|
# - PAGES_STORAGE_S3_BUCKET
|
|
|
|
[build]
|
|
dockerfile = "Dockerfile"
|
|
|
|
[experimental]
|
|
cmd = ["supervisord"]
|
|
|
|
[[vm]]
|
|
cpu-type = "shared"
|
|
cpus = 2
|
|
memory = 512
|
|
|
|
[env]
|
|
UDP_BIND_TO = "fly-global-services"
|
|
ALLOW_PROXY = "172.16.0.0/16"
|
|
AUTOMEMLIMIT = "0.25"
|
|
|
|
[[files]]
|
|
guest_path = "/app/config.toml"
|
|
local_path = "config.fly.toml"
|
|
|
|
[[services]]
|
|
internal_port = 80
|
|
protocol = "tcp"
|
|
ports = [{ port = 80, handlers = ["proxy_proto"], proxy_proto_options = { version = "v2" } }]
|
|
auto_stop_machines = "stop"
|
|
auto_start_machines = true
|
|
|
|
[[services]]
|
|
internal_port = 443
|
|
protocol = "tcp"
|
|
ports = [{ port = 443, handlers = ["proxy_proto"], proxy_proto_options = { version = "v2" } }]
|
|
auto_stop_machines = "stop"
|
|
auto_start_machines = true
|
|
|
|
# NB: Fly.io does not support UDP on public IPv6
|
|
[[services]]
|
|
internal_port = 443
|
|
protocol = "udp"
|
|
ports = [{ port = 443 }]
|
|
auto_stop_machines = "stop"
|
|
auto_start_machines = true
|
|
|
|
[checks.health]
|
|
type = "http"
|
|
method = "get"
|
|
port = 2002
|
|
path = "/"
|
|
grace_period = "5s"
|
|
interval = "2s"
|
|
timeout = "1s"
|