From 5ce04ba694f4be8276f1b79c93f8ea28ee36edfa Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Tue, 16 Jun 2026 11:33:19 -0500 Subject: [PATCH] own network --- docker-compose.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0f1e9f6..9e6d523 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,11 @@ # docker compose up -d --build # -# The host already runs Caddy as a reverse proxy. Caddy forwards requests -# to host.docker.internal:3000 (or localhost:3000 from the host side). -# On Linux, if host.docker.internal does not resolve inside the container, -# uncomment the extra_hosts line below so Caddy can reference it. +# The host runs Caddy as a reverse proxy in its own compose project. +# Caddy forwards requests for email-cc.com to this container by name: +# reverse_proxy email-cc-web:3000 +# For that to resolve, Caddy and this container must share a Docker network. +# The network "email-cc" is created by the Caddy compose project and joined +# here as external. # # Prerequisites: a .env file in the project directory with: # SES_SMTP_USER= @@ -13,8 +15,14 @@ services: web: build: . - ports: - - "3000:3000" + container_name: email-cc-web env_file: - .env restart: unless-stopped + networks: + - email-cc + +networks: + email-cc: + external: true + name: email-cc \ No newline at end of file