1. The problem I’m having:
I want to be able to forward sub.subdomain requests backend things, but automatically
I use docker compose for everything and I want to be able to use container-name.d.example.com
and automatically reverse proxy container-name
to that address, without having to add an entry for every single one
I would likely restrict this entire sub.sub.domain with basic auth so that wont be much of a security problem, this is mainly so that I can have an outbound URL
2. Error messages and/or full log output:
N/A
3. Caddy version:
N/A
4. How I installed and ran Caddy:
Docker Compose
a. System environment:
Docker Compose
Arch Host (assume latest packages as of Nov 15, 2023 as that was latest update)
b. Command:
docker compose up -d
c. Service/unit/compose file:
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
networks:
- default
- skynet
- minecraft
ports:
- 80:80
- 443:443
- 2019/tcp ## exposes to local network
volumes:
- caddy_config:/config
- ./caddy/caddy.conf:/etc/caddy/Caddyfile
- ./caddy:/srv
- ./.workspace:/workspace
caddy-php:
image: "php:7.2-fpm"
container_name: caddy-php
user: "1001:1001"
restart: unless-stopped
volumes:
- ./caddy/:/srv
- ./.workspace:/workspace
networks:
- default
environment:
UID: 1001
GID: 1001
d. My complete Caddy config:
N/A for this question
Will provide if asked