1. Caddy version (caddy version
):
2.4.3, I believe
2. How I run Caddy:
Docker compose, split over different directories.
Caddy is under the caddy dir, and other sites/apps in their own (i.e. wordpress, enclave, etc.), each containing their own docker-compose file.
a. System environment:
Ubuntu 20.04, and Docker/Docker Compose
b. Command:
From within the caddy dir:
docker-compose up -d
c. Service/unit/compose file:
Caddy docker-compose
version: '3.7'
services:
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:
d. My complete Caddyfile or JSON config:
wordpress.domain.tld {
reverse_proxy wordpress:4000
# also tried :80/:443
}
enclave.domain.tld {
reverse_proxy enclave:5000
}
3. The problem I’m having:
Simply put, when visiting the subdomains, I am greeted with a whitescreen, and nothing else.
The DNS does resolve successfully, as when I don’t run the Caddy container, the “site cannot be found”.
If I don’t have the DNS set up, it does to my main site (as intended).
What I would like to achieve, eventually, is to use enclave to gain access to my homeserver which is locked behind CGNAT (all inbound traffic is blocked).
I have plans to have a couple of WordPress sites too, in containers.
Concept:
Remote → DO Droplet, with Docker → Caddy send to containers → either WordPress sites, or Enclave → Home Server
4. Error messages and/or full log output:
5. What I already tried:
I’ve tried two different tutorials (linked below), and both lead to a similar issue.
I have been able to get a successful whoami via the browser, but nothing else.