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
- Choose an example that matches your use case
- Copy the config file to your Gordon directory:
cp examples/minimal.toml gordon.toml - Edit the configuration with your domains and settings
- 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
Cloudflare Setup (Recommended)
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!