version: '3.7' # https://hub.docker.com/r/abiosoft/caddy networks: proxy: name: proxy services: proxy: build: ./proxy container_name: proxy restart: unless-stopped hostname: ${BASE_DOMAIN} environment: - BASE_DOMAIN=${BASE_DOMAIN} - TLS_EMAIL=${CADDY_TLS_EMAIL:-self_signed} - CA_URL=${CADDY_CA_URL} - ACME_AGREE=true - CADDYPATH=/etc/caddycerts ports: - '80:80' - '443:443' - '8448:8448' volumes: - ./proxy/Caddyfile:/etc/Caddyfile:ro - ./proxy/config:/etc/config:ro - ./proxy/.ssh:/root/deploy_keys:ro - ./proxy/autoconfig:/srv/autoconfig:ro - /srv/proxy/certs:/etc/caddycerts - /srv/proxy/srv:/srv networks: - proxy echo: image: jwilder/whoami container_name: echo restart: unless-stopped hostname: echo.${BASE_DOMAIN} networks: - proxy