version: '3.7' # https://hub.docker.com/_/caddy # https://caddyserver.com/docs/caddyfile networks: proxy: name: proxy services: proxy: image: caddy:2-alpine container_name: proxy restart: "${RESTART:-no}" hostname: ${BASE_DOMAIN} environment: - BASE_DOMAIN=${BASE_DOMAIN} - SECOND_MAIL_DOMAIN=${SECOND_MAIL_DOMAIN} - TLS_EMAIL=${CADDY_TLS_EMAIL:-self_signed} - CA_URL=${CADDY_CA_URL} ports: - '80:80' - '443:443' - '8448:8448' # matrix federation volumes: # config / data - ./proxy/Caddyfile:/etc/caddy/Caddyfile:ro - ${BASE_DIR:-/srv}/proxy/config:/config - ${BASE_DIR:-/srv}/proxy/data:/data # srv - ./proxy/autoconfig:/srv/autoconfig:ro - ./proxy/errorpages/dist:/srv/errorpages:ro - ${BASE_DIR:-/srv}/proxy/srv/homepage:/srv/homepage:ro - ${BASE_DIR:-/srv}/minecraft/ampdata/instances/Main/Minecraft/bluemap/web/:/srv/bluemap:ro - ${BASE_DIR:-/srv}/nextcloud/data/${PUBLIC_HTML_USER:-admin}/files/public_html:/srv/public_html:ro networks: - proxy echo: image: jwilder/whoami container_name: echo restart: "${RESTART:-no}" hostname: echo domainname: ${BASE_DOMAIN} networks: - proxy