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