container-server/proxy/docker-compose.yml
2019-12-25 15:48:01 +01:00

48 lines
1 KiB
YAML

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
- ${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