2.0.1 dcf7d6b

README.md RawHistoryFolder

Gordon v2 Configuration Examples

This directory contains configuration examples for different use cases and environments.

πŸ“ Available Examples

πŸš€ minimal.toml

Perfect for getting started

  • Single route configuration
  • Default settings
  • No authentication
  • Ideal for testing and learning

🏠 development.toml

Local development setup

  • Multiple .local domains
  • No authentication for ease of use
  • Third-party development tools
  • localhost registry

πŸ§ͺ staging.toml

Staging and preview environments

  • Branch-based deployments
  • Feature branch testing
  • PR preview environments
  • Separate staging registry

🏭 production.toml

Production-ready configuration

  • Pinned image versions
  • Registry authentication
  • Multiple production services
  • Monitoring tools included

🏒 saas-multi-tenant.toml

Multi-tenant SaaS platform

  • Customer subdomains
  • Custom domains
  • Shared application architecture
  • Enterprise features

πŸš€ Quick Start

  1. Choose an example that matches your use case
  2. Copy the config file to your Gordon directory:
    cp examples/minimal.toml gordon.toml
    
  3. Edit the configuration with your domains and settings
  4. Start Gordon:
    gordon start
    

πŸ”§ Customization Tips

Domain Configuration

Update the [routes] section with your actual domains:

[routes]
"your-domain.com" = "your-app:latest"
"api.your-domain.com" = "your-api:v1.0.0"

Registry Setup

Configure your registry domain and authentication:

[server]
registry_domain = "registry.your-domain.com"

[registry_auth]
enabled = true
username = "your-username"
password = "your-secure-password"

Container Runtime Setup

Gordon supports Docker and Podman with automatic detection:

[server]
runtime = "auto"  # auto, docker, podman, podman-rootless
socket_path = ""  # optional custom socket path

# Examples:
# runtime = "docker"          # Force Docker
# runtime = "podman"          # Force Podman root
# runtime = "podman-rootless" # Force Podman rootless
# socket_path = "unix:///run/user/1000/podman/podman.sock"

Override with environment variables:

# Works for both Docker and Podman
export CONTAINER_HOST=unix:///custom/path/container.sock
export CONTAINER_HOST=tcp://remote-docker:2376
gordon start

Environment Variables

For production, use environment variables for sensitive data:

export GORDON_REGISTRY_PASSWORD="your-secure-password"
export GORDON_SSL_EMAIL="admin@your-domain.com"

🌐 DNS Configuration

For all examples except development, set up these DNS records:

Type  Name                    Content
A     app.your-domain.com     YOUR_SERVER_IP
A     api.your-domain.com     YOUR_SERVER_IP  
A     registry.your-domain.com YOUR_SERVER_IP

Or use a wildcard:

Type  Name                    Content
A     *.your-domain.com       YOUR_SERVER_IP

Local Development

For the development example, add to /etc/hosts:

127.0.0.1  app.local
127.0.0.1  api.local
127.0.0.1  admin.local

πŸ”„ Workflow Examples

Simple Deployment

# Build your app
docker build -t myapp:latest .

# Tag for registry  
docker tag myapp:latest registry.your-domain.com/myapp:latest

# Push to deploy
docker push registry.your-domain.com/myapp:latest

Version Management

# Tag with version
docker tag myapp:latest registry.your-domain.com/myapp:v1.2.0

# Update config
# "app.your-domain.com" = "myapp:v1.2.0"

# Push to deploy specific version
docker push registry.your-domain.com/myapp:v1.2.0

🀝 Need Help?

  • πŸ“– Read the main README for detailed documentation
  • πŸ” Check the logs for deployment issues
  • πŸ› Open an issue if you find problems with these examples
  • πŸ’‘ Contribute your own configuration examples!

These examples are starting points - customize them for your specific needs!

source
1# Gordon v2 Configuration Examples
2
3This directory contains configuration examples for different use cases and environments.
4
5## πŸ“ Available Examples
6
7### πŸš€ [`minimal.toml`](minimal.toml)
8**Perfect for getting started**
9- Single route configuration
10- Default settings
11- No authentication
12- Ideal for testing and learning
13
14### 🏠 [`development.toml`](development.toml)
15**Local development setup**
16- Multiple .local domains
17- No authentication for ease of use
18- Third-party development tools
19- localhost registry
20
21### πŸ§ͺ [`staging.toml`](staging.toml)
22**Staging and preview environments**
23- Branch-based deployments
24- Feature branch testing
25- PR preview environments
26- Separate staging registry
27
28### 🏭 [`production.toml`](production.toml)
29**Production-ready configuration**
30- Pinned image versions
31- Registry authentication
32- Multiple production services
33- Monitoring tools included
34
35### 🏒 [`saas-multi-tenant.toml`](saas-multi-tenant.toml)
36**Multi-tenant SaaS platform**
37- Customer subdomains
38- Custom domains
39- Shared application architecture
40- Enterprise features
41
42## πŸš€ Quick Start
43
441. **Choose an example** that matches your use case
452. **Copy the config file** to your Gordon directory:
46   ```bash
47   cp examples/minimal.toml gordon.toml
48   ```
493. **Edit the configuration** with your domains and settings
504. **Start Gordon**:
51   ```bash
52   gordon start
53   ```
54
55## πŸ”§ Customization Tips
56
57### Domain Configuration
58Update the `[routes]` section with your actual domains:
59```toml
60[routes]
61"your-domain.com" = "your-app:latest"
62"api.your-domain.com" = "your-api:v1.0.0"
63```
64
65### Registry Setup
66Configure your registry domain and authentication:
67```toml
68[server]
69registry_domain = "registry.your-domain.com"
70
71[registry_auth]
72enabled = true
73username = "your-username"
74password = "your-secure-password"
75```
76
77### Container Runtime Setup
78Gordon supports Docker and Podman with automatic detection:
79```toml
80[server]
81runtime = "auto"  # auto, docker, podman, podman-rootless
82socket_path = ""  # optional custom socket path
83
84# Examples:
85# runtime = "docker"          # Force Docker
86# runtime = "podman"          # Force Podman root
87# runtime = "podman-rootless" # Force Podman rootless
88# socket_path = "unix:///run/user/1000/podman/podman.sock"
89```
90
91Override with environment variables:
92```bash
93# Works for both Docker and Podman
94export CONTAINER_HOST=unix:///custom/path/container.sock
95export CONTAINER_HOST=tcp://remote-docker:2376
96gordon start
97```
98
99### Environment Variables
100For production, use environment variables for sensitive data:
101```bash
102export GORDON_REGISTRY_PASSWORD="your-secure-password"
103export GORDON_SSL_EMAIL="admin@your-domain.com"
104```
105
106## 🌐 DNS Configuration
107
108### Cloudflare Setup (Recommended)
109For all examples except development, set up these DNS records:
110
111```
112Type  Name                    Content
113A     app.your-domain.com     YOUR_SERVER_IP
114A     api.your-domain.com     YOUR_SERVER_IP  
115A     registry.your-domain.com YOUR_SERVER_IP
116```
117
118Or use a wildcard:
119```
120Type  Name                    Content
121A     *.your-domain.com       YOUR_SERVER_IP
122```
123
124### Local Development
125For the development example, add to `/etc/hosts`:
126```
127127.0.0.1  app.local
128127.0.0.1  api.local
129127.0.0.1  admin.local
130```
131
132## πŸ”„ Workflow Examples
133
134### Simple Deployment
135```bash
136# Build your app
137docker build -t myapp:latest .
138
139# Tag for registry  
140docker tag myapp:latest registry.your-domain.com/myapp:latest
141
142# Push to deploy
143docker push registry.your-domain.com/myapp:latest
144```
145
146### Version Management
147```bash
148# Tag with version
149docker tag myapp:latest registry.your-domain.com/myapp:v1.2.0
150
151# Update config
152# "app.your-domain.com" = "myapp:v1.2.0"
153
154# Push to deploy specific version
155docker push registry.your-domain.com/myapp:v1.2.0
156```
157
158## 🀝 Need Help?
159
160- πŸ“– **Read the main [README](../README.md)** for detailed documentation
161- πŸ” **Check the logs** for deployment issues
162- πŸ› **Open an issue** if you find problems with these examples
163- πŸ’‘ **Contribute** your own configuration examples!
164
165---
166*These examples are starting points - customize them for your specific needs!*

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