# Gordon v2 - Development Configuration Example # For local development and testing [server] port = 8080 registry_port = 5000 registry_domain = "registry.yourdomain.com" # Your Gordon registry domain runtime = "auto" # auto-detects Docker/Podman ssl_email = "dev@localhost" data_dir = "./dev-data" [registry_auth] enabled = false # Disable auth for easier local development [auto_route] enabled = true # Enable automatic route creation from image names # Volume configuration - auto-creates persistent storage from VOLUME directives [volumes] auto_create = true # Default: true (automatically handle VOLUME directives) prefix = "gordon" # Default: "gordon" (volume name prefix) preserve = true # Default: true (keep volumes when containers are removed) # Logging configuration for development [logging] enabled = true # Enable file-based logging level = "debug" # Verbose logging for development dir = "./dev-data/logs" # Store logs in dev data directory main_log_file = "gordon.log" # Main application logs proxy_log_file = "proxy.log" # HTTP proxy traffic logs container_log_dir = "containers" # Container logs subdirectory # Log rotation settings - smaller for development max_size = 10 # Max 10MB per log file max_backups = 3 # Keep 3 old files max_age = 7 # Keep logs for 1 week compress = true # Compress old logs # Environment variables configuration [env] # Directory where .env files are stored for each route dir = "./dev-data/env" # Secret providers (optional for development) providers = ["pass"] # For development secrets # Development routes using your domain [routes] "app.yourdomain.com" = "myapp:latest" # Main app - latest build "api.yourdomain.com" = "myapi:latest" # API service "admin.yourdomain.com" = "admin:latest" # Admin interface "docs.yourdomain.com" = "docs:latest" # Documentation # Test different versions "app-v1.yourdomain.com" = "myapp:v1.0.0" # Test older version "app-v2.yourdomain.com" = "myapp:v2.0.0" # Test newer version # Third-party services for development "db-admin.yourdomain.com" = "phpmyadmin:latest" # Database admin "mail.yourdomain.com" = "mailhog/mailhog:latest" # Email testing # Network isolation configuration [network_isolation] enabled = true # Enable per-app network isolation network_prefix = "gordon" # Default prefix for network names dns_suffix = ".internal" # DNS suffix for internal services # Service attachments - each app gets its own isolated network with attached services [attachments] "app.yourdomain.com" = ["my-postgres:latest", "my-redis:latest"] # App with database and cache "api.yourdomain.com" = ["my-postgres:latest"] # API with its own database "admin.yourdomain.com" = ["my-mysql:latest"] # Admin with different database # Optional: Network groups for shared services between apps # [network_groups] # "backend" = ["app.yourdomain.com", "api.yourdomain.com"] # Share services between app and api # # [attachments] # "backend" = ["my-redis:latest", "rabbitmq:latest"] # Shared cache and queue # "app.yourdomain.com" = ["my-postgres:latest"] # App-specific database # "api.yourdomain.com" = ["my-postgres:latest"] # API-specific database # "admin.yourdomain.com" = ["my-mysql:latest"] # Admin gets its own isolated network # Environment Variables Usage: # # For development, create .env files for your routes: # ./dev-data/env/app_yourdomain_com.env # ./dev-data/env/api_yourdomain_com.env # # Example env file content: # NODE_ENV=development # DEBUG=true # DATABASE_URL=postgresql://localhost:5432/dev # API_KEY=${pass:dev/api-key} # Optional: use pass for dev secrets # Development workflow: # 1. Point DNS to your Gordon server: # A *.yourdomain.com → YOUR_GORDON_SERVER_IP # A yourdomain.com → YOUR_GORDON_SERVER_IP # # 2. Build your app: docker build -t myapp:latest . # 3. Create env file: ./dev-data/env/app_yourdomain_com.env # 4. Push to Gordon registry: # docker tag myapp:latest registry.yourdomain.com/myapp:latest # docker push registry.yourdomain.com/myapp:latest # 5. Access at https://app.yourdomain.com # # AUTO-ROUTE FEATURE: # With auto_route.enabled = true, you can also push images with domain names as image names: # docker build -t myapp . # docker tag myapp:latest registry.yourdomain.com/mytestapp.bamen.dev:latest # docker push registry.yourdomain.com/mytestapp.bamen.dev:latest # Gordon will automatically create a route for mytestapp.bamen.dev -> mytestapp.bamen.dev:latest # # VOLUME FEATURE: # Add VOLUME directives to your Dockerfile for automatic persistent storage: # VOLUME ["/app/data", "/app/uploads"] # Gordon automatically creates and mounts persistent volumes - no config needed! # # ENV DIRECTIVE FEATURE: # Add ENV directives to your Dockerfile for default environment variables: # ENV NODE_ENV=production # ENV PORT=3000 # ENV LOG_LEVEL=info # Gordon automatically reads these and merges them with your .env files! # Your .env files always override Dockerfile ENV directives. # # Example Dockerfile with both features: # FROM node:18-alpine # WORKDIR /app # ENV NODE_ENV=production # ENV PORT=3000 # VOLUME ["/app/data", "/app/logs"] # COPY . . # EXPOSE 3000 # CMD ["npm", "start"] # # Cloudflare handles SSL and DNS for your remote Gordon server! # # NETWORK ISOLATION FEATURE: # With attachments, each app gets its own isolated network with attached services. # Services are accessible by their simple names within the network: # - postgresql://postgres:5432/mydb # - redis://redis:6379 # - mysql://mysql:3306/mydb # # To use persistent storage with attachments, create custom Dockerfiles: # # Example my-postgres Dockerfile: # FROM postgres:15 # VOLUME ["/var/lib/postgresql/data"] # ENV POSTGRES_DB=myapp # ENV POSTGRES_USER=appuser # ENV POSTGRES_PASSWORD=secret # # Build and push to registry: # docker build -f Dockerfile.postgres -t registry.yourdomain.com/my-postgres:latest . # docker push registry.yourdomain.com/my-postgres:latest