Add DOMAIN_NAME to caddy

This commit is contained in:
AiratTop
2025-10-19 19:53:51 +03:00
parent d0070f9a57
commit 18693fc1a2
3 changed files with 6 additions and 4 deletions

4
.env
View File

@@ -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

View File

@@ -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
# }

View File

@@ -70,6 +70,8 @@ services:
- '80:80'
- '443:443'
- '443:443/udp'
environment:
DOMAIN_NAME: ${DOMAIN_NAME}
volumes:
- ./data/caddy:/data
- ./config:/etc/caddy