v2.2.6 c872d45

index.md RawHistoryFolder

Configuration Overview

Gordon uses a single TOML configuration file located at ~/.config/gordon/gordon.toml.

Configuration File Location

Location Purpose
~/.config/gordon/gordon.toml Default configuration file
Custom path via --config flag gordon start --config /path/to/config.toml

Minimal Configuration

[server]
port = 8080
registry_port = 5000
registry_domain = "registry.mydomain.com"

[routes]
"app.mydomain.com" = "myapp:latest"

Full Configuration Reference

Note: This example shows production-style paths. Default paths use ~/.gordon/ for user installations.

# Server settings
[server]
port = 8080                              # HTTP proxy port (default: 80)
registry_port = 5000                     # Registry port (default: 5000)
registry_domain = "registry.mydomain.com" # Required: registry domain
# data_dir = "~/.gordon"                 # Default for user installations

# Secrets backend
[secrets]
backend = "pass"                         # "pass", "sops", or "unsafe"

# Registry authentication
[registry_auth]
enabled = true
type = "token"                           # "password" or "token"
# Password auth:
# username = "deploy"
# password_hash = "gordon/registry/password_hash"
# Token auth:
token_secret = "gordon/registry/token_secret"
token_expiry = "720h"                    # Duration or 0 for never

# Logging
[logging]
level = "info"                           # trace, debug, info, warn, error
format = "console"                       # console or json

[logging.file]
enabled = true
path = "~/.gordon/logs/gordon.log"       # Default location
max_size = 100                           # MB before rotation
max_backups = 3                          # Old files to keep
max_age = 28                             # Days to keep

[logging.container_logs]
enabled = true
dir = "~/.gordon/logs/containers"        # Default location
max_size = 100
max_backups = 3
max_age = 28

# Environment variables
[env]
dir = "~/.gordon/env"                    # Default location

# Volume settings
[volumes]
auto_create = true                       # Auto-create from Dockerfile VOLUME
prefix = "gordon"                        # Volume name prefix
preserve = true                          # Keep volumes on container removal

# Network isolation
[network_isolation]
enabled = true                           # Per-app isolated networks
network_prefix = "gordon"                # Network name prefix
dns_suffix = ".internal"                 # DNS suffix for services

# Auto-route
[auto_route]
enabled = false                          # Auto-create routes from image names

# Routes (required)
[routes]
"app.mydomain.com" = "myapp:latest"
"api.mydomain.com" = "myapi:v2.1.0"

# Network groups
[network_groups]
"backend" = ["app.mydomain.com", "api.mydomain.com"]

# Attachments
[attachments]
"app.mydomain.com" = ["postgres:latest", "redis:latest"]
"backend" = ["rabbitmq:latest"]

Configuration Sections

Section Description Documentation
[server] Core server settings Server
[secrets] Secrets backend configuration Secrets
[registry_auth] Registry authentication Registry Auth
[logging] Logging configuration Logging
[env] Environment variable settings Environment
[volumes] Volume management Volumes
[network_isolation] Network isolation settings Network Isolation
[auto_route] Automatic route creation Auto Route
[routes] Domain to image mapping Routes
[external_routes] Non-containerized service proxying External Routes
[network_groups] Shared service networks Network Groups
[attachments] Service dependencies Attachments

Default Values

Setting Default
server.port 80
server.registry_port 5000
server.data_dir ~/.gordon
secrets.backend "unsafe"
registry_auth.enabled false
registry_auth.type "password"
registry_auth.token_expiry "720h"
logging.level "info"
logging.format "console"
logging.file.enabled false
logging.file.max_size 100
logging.file.max_backups 3
logging.file.max_age 28
logging.container_logs.enabled true
volumes.auto_create true
volumes.prefix "gordon"
volumes.preserve true
network_isolation.enabled false
auto_route.enabled false

Hot Reload

Gordon watches the configuration file and reloads automatically when changes are detected. You can also trigger a manual reload:

gordon reload

The following settings require a restart to take effect:

  • server.port
  • server.registry_port
  • server.data_dir
  • secrets.backend
  • registry_auth settings

Environment Variable Override

Configuration values can be overridden with environment variables:

GORDON_SERVER_PORT=8080 gordon start
GORDON_LOGGING_LEVEL=debug gordon start

Pattern: GORDON_SECTION_KEY (uppercase, underscores instead of dots)

source
1# Configuration Overview
2
3Gordon uses a single TOML configuration file located at `~/.config/gordon/gordon.toml`.
4
5## Configuration File Location
6
7| Location | Purpose |
8|----------|---------|
9| `~/.config/gordon/gordon.toml` | Default configuration file |
10| Custom path via `--config` flag | `gordon start --config /path/to/config.toml` |
11
12## Minimal Configuration
13
14```toml
15[server]
16port = 8080
17registry_port = 5000
18registry_domain = "registry.mydomain.com"
19
20[routes]
21"app.mydomain.com" = "myapp:latest"
22```
23
24## Full Configuration Reference
25
26> **Note:** This example shows production-style paths. Default paths use `~/.gordon/` for user installations.
27
28```toml
29# Server settings
30[server]
31port = 8080                              # HTTP proxy port (default: 80)
32registry_port = 5000                     # Registry port (default: 5000)
33registry_domain = "registry.mydomain.com" # Required: registry domain
34# data_dir = "~/.gordon"                 # Default for user installations
35
36# Secrets backend
37[secrets]
38backend = "pass"                         # "pass", "sops", or "unsafe"
39
40# Registry authentication
41[registry_auth]
42enabled = true
43type = "token"                           # "password" or "token"
44# Password auth:
45# username = "deploy"
46# password_hash = "gordon/registry/password_hash"
47# Token auth:
48token_secret = "gordon/registry/token_secret"
49token_expiry = "720h"                    # Duration or 0 for never
50
51# Logging
52[logging]
53level = "info"                           # trace, debug, info, warn, error
54format = "console"                       # console or json
55
56[logging.file]
57enabled = true
58path = "~/.gordon/logs/gordon.log"       # Default location
59max_size = 100                           # MB before rotation
60max_backups = 3                          # Old files to keep
61max_age = 28                             # Days to keep
62
63[logging.container_logs]
64enabled = true
65dir = "~/.gordon/logs/containers"        # Default location
66max_size = 100
67max_backups = 3
68max_age = 28
69
70# Environment variables
71[env]
72dir = "~/.gordon/env"                    # Default location
73
74# Volume settings
75[volumes]
76auto_create = true                       # Auto-create from Dockerfile VOLUME
77prefix = "gordon"                        # Volume name prefix
78preserve = true                          # Keep volumes on container removal
79
80# Network isolation
81[network_isolation]
82enabled = true                           # Per-app isolated networks
83network_prefix = "gordon"                # Network name prefix
84dns_suffix = ".internal"                 # DNS suffix for services
85
86# Auto-route
87[auto_route]
88enabled = false                          # Auto-create routes from image names
89
90# Routes (required)
91[routes]
92"app.mydomain.com" = "myapp:latest"
93"api.mydomain.com" = "myapi:v2.1.0"
94
95# Network groups
96[network_groups]
97"backend" = ["app.mydomain.com", "api.mydomain.com"]
98
99# Attachments
100[attachments]
101"app.mydomain.com" = ["postgres:latest", "redis:latest"]
102"backend" = ["rabbitmq:latest"]
103```
104
105## Configuration Sections
106
107| Section | Description | Documentation |
108|---------|-------------|---------------|
109| `[server]` | Core server settings | [Server](./server.md) |
110| `[secrets]` | Secrets backend configuration | [Secrets](./secrets.md) |
111| `[registry_auth]` | Registry authentication | [Registry Auth](./registry-auth.md) |
112| `[logging]` | Logging configuration | [Logging](./logging.md) |
113| `[env]` | Environment variable settings | [Environment](./env.md) |
114| `[volumes]` | Volume management | [Volumes](./volumes.md) |
115| `[network_isolation]` | Network isolation settings | [Network Isolation](./network-isolation.md) |
116| `[auto_route]` | Automatic route creation | [Auto Route](./auto-route.md) |
117| `[routes]` | Domain to image mapping | [Routes](./routes.md) |
118| `[external_routes]` | Non-containerized service proxying | [External Routes](./external-routes.md) |
119| `[network_groups]` | Shared service networks | [Network Groups](./network-groups.md) |
120| `[attachments]` | Service dependencies | [Attachments](./attachments.md) |
121
122## Default Values
123
124| Setting | Default |
125|---------|---------|
126| `server.port` | `80` |
127| `server.registry_port` | `5000` |
128| `server.data_dir` | `~/.gordon` |
129| `secrets.backend` | `"unsafe"` |
130| `registry_auth.enabled` | `false` |
131| `registry_auth.type` | `"password"` |
132| `registry_auth.token_expiry` | `"720h"` |
133| `logging.level` | `"info"` |
134| `logging.format` | `"console"` |
135| `logging.file.enabled` | `false` |
136| `logging.file.max_size` | `100` |
137| `logging.file.max_backups` | `3` |
138| `logging.file.max_age` | `28` |
139| `logging.container_logs.enabled` | `true` |
140| `volumes.auto_create` | `true` |
141| `volumes.prefix` | `"gordon"` |
142| `volumes.preserve` | `true` |
143| `network_isolation.enabled` | `false` |
144| `auto_route.enabled` | `false` |
145
146## Hot Reload
147
148Gordon watches the configuration file and reloads automatically when changes are detected. You can also trigger a manual reload:
149
150```bash
151gordon reload
152```
153
154The following settings require a restart to take effect:
155
156- `server.port`
157- `server.registry_port`
158- `server.data_dir`
159- `secrets.backend`
160- `registry_auth` settings
161
162## Environment Variable Override
163
164Configuration values can be overridden with environment variables:
165
166```bash
167GORDON_SERVER_PORT=8080 gordon start
168GORDON_LOGGING_LEVEL=debug gordon start
169```
170
171Pattern: `GORDON_SECTION_KEY` (uppercase, underscores instead of dots)
172
173## Related
174
175- [Server Configuration](./server.md)
176- [Routes Configuration](./routes.md)
177- [External Routes](./external-routes.md)
178- [Registry Authentication](./registry-auth.md)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close