diff --git a/.env b/.env index 4d6787d..f8d24fa 100644 --- a/.env +++ b/.env @@ -1,11 +1,11 @@ # The top level domain to serve from -DOMAIN_NAME=example.com +DOMAIN_NAME=your-domain.com # The subdomain to serve from SUBDOMAIN=n8n # DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from -# above example would result in: https://n8n.example.com +# above example would result in: https://n8n.your-domain.com # Optional timezone to set which gets used by Cron-Node by default # If not set New York time will be used diff --git a/config/Caddyfile b/config/Caddyfile index 78a40a1..bc10038 100644 --- a/config/Caddyfile +++ b/config/Caddyfile @@ -12,7 +12,7 @@ # Main n8n service. -n8n.your-domain.com { +n8n.{$DOMAIN_NAME} { # Prevents search engines from indexing this site. header X-Robots-Tag "noindex, nofollow" @@ -30,6 +30,6 @@ n8n.your-domain.com { } # Example for another service -# another-service.your-domain.com { +# another-service.{$DOMAIN_NAME} { # reverse_proxy another-service-container-name:8080 # } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 648f8af..95c0e8d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -70,6 +70,8 @@ services: - '80:80' - '443:443' - '443:443/udp' + environment: + DOMAIN_NAME: ${DOMAIN_NAME} volumes: - ./data/caddy:/data - ./config:/etc/caddy