51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
version: '3.7'
|
|
|
|
# https://caddyserver.com/v1/docs
|
|
|
|
networks:
|
|
proxy:
|
|
name: proxy
|
|
|
|
services:
|
|
proxy:
|
|
# build: ./proxy
|
|
image: caddy:alpine
|
|
container_name: proxy
|
|
restart: "${RESTART:-no}"
|
|
hostname: ${BASE_DOMAIN}
|
|
environment:
|
|
- BASE_DOMAIN=${BASE_DOMAIN}
|
|
# - CADDYPATH=/etc/caddycerts
|
|
- TLS_EMAIL=${CADDY_TLS_EMAIL:-self_signed}
|
|
- CA_URL=${CADDY_CA_URL}
|
|
- DEV_PASS=${CADDY_DEV_PASS}
|
|
ports:
|
|
- '80:80'
|
|
- '443:443'
|
|
- '8448:8448' # matrix federation
|
|
volumes:
|
|
# config
|
|
- ./proxy/Caddyfile:/etc/Caddyfile:ro
|
|
- ./proxy/config:/etc/config:ro
|
|
# autoconfig
|
|
- ./proxy/autoconfig:/srv/autoconfig:ro
|
|
# errorpages
|
|
- ./proxy/errorpages:/srv/errorpages:ro
|
|
# ssh deploy keys
|
|
- ${BASE_DIR:-/srv}/proxy/ssh:/root/deploy_keys:ro
|
|
# certs
|
|
- ${BASE_DIR:-/srv}/proxy/certs:/etc/caddycerts
|
|
# srv
|
|
- ${BASE_DIR:-/srv}/proxy/srv:/srv
|
|
networks:
|
|
- proxy
|
|
- reloader
|
|
|
|
echo:
|
|
image: jwilder/whoami
|
|
container_name: echo
|
|
restart: "${RESTART:-no}"
|
|
hostname: echo
|
|
domainname: ${BASE_DOMAIN}
|
|
networks:
|
|
- proxy
|