diff --git a/.envrc.sample b/.envrc.sample index aec4870..09e6996 100644 --- a/.envrc.sample +++ b/.envrc.sample @@ -4,6 +4,7 @@ export STACK_NAME=traefik export DOMAIN=traefik.example.com export LETS_ENCRYPT_ENV=production +export LETS_ENCRYPT_EMAIL=certs@example.com # export DASHBOARD_ENABLED=true # WARN, INFO etc. export LOG_LEVEL=WARN @@ -19,3 +20,6 @@ export TRAEFIK_YML_VERSION=v1 ## SMTP port 587 #export COMPOSE_FILE="compose.yml:compose.smtp.yml" #export SMTP_ENABLED=1 + +## Host-mode networking +#export COMPOSE_FILE="compose.yml:compose.host.yml" diff --git a/compose.host.yml b/compose.host.yml new file mode 100644 index 0000000..4062947 --- /dev/null +++ b/compose.host.yml @@ -0,0 +1,15 @@ +--- +version: "3.8" + +services: + traefik: + ports: + - target: 80 + published: 80 + mode: host + - target: 443 + published: 443 + mode: host + - target: 2222 + published: 2222 + mode: host diff --git a/compose.yml b/compose.yml index 144e88f..13892cd 100644 --- a/compose.yml +++ b/compose.yml @@ -5,15 +5,9 @@ services: traefik: image: "traefik:2.3.2" ports: - - target: 80 - published: 80 - mode: host - - target: 443 - published: 443 - mode: host - - target: 2222 - published: 2222 - mode: host + - "80:80" + - "443:443" + - "2222:2222" volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "letsencrypt:/etc/letsencrypt"