-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Variables Compose
Module: compose
Schema Version: 1.2
Description: Manage Docker Compose configurations
This page documents all available variables for the compose module. Variables are organized into sections that can be enabled/disabled based on your configuration needs.
- General
- Network
- Ports
- Traefik
- Traefik TLS/SSL
- Volume Storage
- Resource Limits
- Docker Swarm
- Database
- Email Server
- Authentik SSO
| Variable | Type | Default | Description |
|---|---|---|---|
service_name |
str |
none | Service name |
container_name |
str |
none | Container name |
container_hostname |
str |
none | Container internal hostname |
container_timezone |
str |
none | Container timezone (e.g., Europe/Berlin) |
user_uid |
int |
1000 |
User UID for container process |
user_gid |
int |
1000 |
User GID for container process |
container_loglevel |
enum |
none | Container log level Options: debug, info, warn, error
|
restart_policy |
enum |
unless-stopped |
Container restart policy Options: unless-stopped, always, on-failure, no
|
| Variable | Type | Default | Description |
|---|---|---|---|
network_mode |
enum |
none | Docker network mode Options: bridge, host, macvlan • bridge=default Docker networking, host=use host network stack, macvlan=dedicated MAC address on physical network |
network_name |
str |
bridge |
Docker network name Needs: ['network_mode=bridge,macvlan']
|
network_external |
bool |
✗ | Use existing Docker network (external) Needs: ['network_mode=bridge,macvlan']
|
network_macvlan_ipv4_address |
str |
192.168.1.253 |
Static IP address for container Needs: ['network_mode=macvlan']
|
network_macvlan_parent_interface |
str |
eth0 |
Host network interface name Needs: ['network_mode=macvlan']
|
network_macvlan_subnet |
str |
192.168.1.0/24 |
Network subnet in CIDR notation Needs: ['network_mode=macvlan']
|
network_macvlan_gateway |
str |
192.168.1.1 |
Network gateway IP address Needs: ['network_mode=macvlan']
|
Depends On: network_mode!=host,macvlan
Expose service ports to the host.
| Variable | Type | Default | Description |
|---|---|---|---|
ports_http |
int |
8080 |
HTTP port on host Needs: ['traefik_enabled=false']
|
ports_https |
int |
8443 |
HTTPS port on host Needs: ['traefik_enabled=false']
|
ports_ssh |
int |
22 |
SSH port on host |
ports_dns |
int |
53 |
DNS port on host |
ports_dhcp |
int |
67 |
DHCP port on host |
ports_smtp |
int |
25 |
SMTP port on host |
ports_snmp |
int |
162 |
SNMP trap port |
Toggle Variable: traefik_enabled
Depends On: network_mode!=host,macvlan
Traefik routes external traffic to your service.
| Variable | Type | Default | Description |
|---|---|---|---|
traefik_enabled |
bool |
✗ | Enable Traefik reverse proxy integration |
traefik_network |
str |
traefik |
Traefik network name |
traefik_host |
str |
none | Service subdomain or full hostname (e.g., 'app' or 'app.example.com') |
traefik_domain |
str |
home.arpa |
Base domain (e.g., example.com) |
Toggle Variable: traefik_tls_enabled
Depends On: traefik_enabled=true, network_mode!=host,macvlan
Enable HTTPS/TLS for Traefik with certificate management.
| Variable | Type | Default | Description |
|---|---|---|---|
traefik_tls_enabled |
bool |
✓ | Enable HTTPS/TLS |
traefik_tls_certresolver |
str |
cloudflare |
Traefik certificate resolver name |
Configure persistent storage for your service.
| Variable | Type | Default | Description |
|---|---|---|---|
volume_mode |
enum |
local |
Volume storage backend Options: local, mount, nfs
|
volume_mount_path |
str |
/mnt/storage |
Host path for bind mounts Needs: ['volume_mode=mount']
|
volume_nfs_server |
str |
192.168.1.1 |
NFS server address Needs: ['volume_mode=nfs']
|
volume_nfs_path |
str |
/export |
NFS export path Needs: ['volume_mode=nfs']
|
volume_nfs_options |
str |
rw,nolock,soft |
NFS mount options (comma-separated) Needs: ['volume_mode=nfs']
|
Toggle Variable: resources_enabled
Set CPU and memory limits for the service.
| Variable | Type | Default | Description |
|---|---|---|---|
resources_enabled |
bool |
✗ | Enable resource limits |
resources_cpu_limit |
str |
1.0 |
Maximum CPU cores (e.g., 0.5, 1.0, 2.0) |
resources_cpu_reservation |
str |
0.25 |
Reserved CPU cores Needs: ['swarm_enabled=true']
|
resources_memory_limit |
str |
1G |
Maximum memory (e.g., 512M, 1G, 2G) |
resources_memory_reservation |
str |
512M |
Reserved memory Needs: ['swarm_enabled=true']
|
Toggle Variable: swarm_enabled
Depends On: network_mode!=host,macvlan
Deploy service in Docker Swarm mode.
| Variable | Type | Default | Description |
|---|---|---|---|
swarm_enabled |
bool |
✗ | Enable Docker Swarm mode |
swarm_placement_mode |
enum |
replicated |
Swarm placement mode Options: replicated, global
|
swarm_replicas |
int |
1 |
Number of replicas Needs: ['swarm_placement_mode=replicated']
|
swarm_placement_host |
str |
none | Target hostname for placement constraint Needs: ['swarm_placement_mode=replicated'] • Constrains service to run on specific node by hostname |
Toggle Variable: database_enabled
Connect to external database (PostgreSQL or MySQL)
| Variable | Type | Default | Description |
|---|---|---|---|
database_enabled |
bool |
✗ | Enable external database integration |
database_type |
enum |
sqlite |
Database type Options: sqlite, postgres, mysql
|
database_external |
bool |
✗ | Use an external database server? Needs: ['database_type=postgres,mysql'] • skips creation of internal database container |
database_host |
str |
none | Database host Needs: ['database_external=true;database_type=postgres,mysql']
|
database_port |
int |
none | Database port Needs: ['database_external=true;database_type=postgres,mysql']
|
database_name |
str |
none | Database name Needs: ['database_type=postgres,mysql']
|
database_user |
str |
none | Database user Needs: ['database_type=postgres,mysql']
|
database_password |
str |
none | Database password Sensitive • Auto-generated • Needs: ['database_type=postgres,mysql']
|
Toggle Variable: email_enabled
Configure email server for notifications and user management.
| Variable | Type | Default | Description |
|---|---|---|---|
email_enabled |
bool |
✗ | Enable email server configuration |
email_host |
str |
none | SMTP server hostname |
email_port |
int |
25 |
SMTP server port |
email_username |
str |
none | SMTP username |
email_password |
str |
none | SMTP password Sensitive |
email_from |
str |
none | From email address |
email_encryption |
enum |
none | Email encryption method to use Options: none, starttls, ssl
|
Toggle Variable: authentik_enabled
Integrate with Authentik for Single Sign-On authentication.
| Variable | Type | Default | Description |
|---|---|---|---|
authentik_enabled |
bool |
✗ | Enable Authentik SSO integration |
authentik_url |
url |
none | Authentik base URL (e.g., https://auth.example.com) |
authentik_slug |
str |
none | Authentik application slug |
authentik_traefik_middleware |
str |
authentik-middleware@file |
Traefik middleware name for Authentik authentication Needs: ['traefik_enabled=true']
|
authentik_client_id |
str |
none | Authentik OAuth2 client ID Sensitive |
authentik_client_secret |
str |
none | Authentik OAuth2 client secret Sensitive |
- Required sections must be configured
- Toggle variables enable/disable entire sections
-
Dependencies (
needs) control when sections/variables are available - Sensitive variables are masked during prompts
- Auto-generated variables are populated automatically if not provided
Last updated: Schema version 1.2