mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 13:16:17 +00:00
Exposing ports on docker-compose bypasses UFW definitions, which is a high risk, so we use internal networks only to connect between containers
20 lines
484 B
YAML
20 lines
484 B
YAML
services:
|
|
caddy:
|
|
image: caddy:latest
|
|
container_name: caddy
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./settings:/etc/caddy
|
|
- ./static:/srv/static
|
|
- ./caddy_data:/data
|
|
- ./caddy_config:/config
|
|
restart: unless-stopped
|
|
networks:
|
|
- caddy_net
|
|
|
|
networks:
|
|
caddy_net: # Crete VPN internal - Need to bind running containers to this network as well
|
|
external: true # caddy_net must be created before spinning up containers
|