container-server/proxy/docker-compose.yml

49 lines
1 KiB
YAML
Raw Normal View History

2019-11-05 20:58:51 +01:00
version: '3.7'
2020-02-04 19:05:07 +01:00
# https://caddyserver.com/v1/docs
2019-11-10 21:50:43 +01:00
2019-11-05 20:58:51 +01:00
networks:
proxy:
name: proxy
services:
proxy:
build: ./proxy
container_name: proxy
2019-12-04 22:00:35 +01:00
restart: "${RESTART:-no}"
2019-11-05 20:58:51 +01:00
hostname: ${BASE_DOMAIN}
2019-11-06 21:18:36 +01:00
environment:
- BASE_DOMAIN=${BASE_DOMAIN}
2019-11-10 21:50:43 +01:00
- CADDYPATH=/etc/caddycerts
2019-11-26 21:13:34 +01:00
- TLS_EMAIL=${CADDY_TLS_EMAIL:-self_signed}
- CA_URL=${CADDY_CA_URL}
2019-11-26 21:13:34 +01:00
- DEV_PASS=${CADDY_DEV_PASS}
2019-11-05 20:58:51 +01:00
ports:
- '80:80'
- '443:443'
2019-11-19 23:17:02 +01:00
- '8448:8448'
2019-11-05 20:58:51 +01:00
volumes:
2019-11-26 21:07:43 +01:00
# config
2019-11-05 20:58:51 +01:00
- ./proxy/Caddyfile:/etc/Caddyfile:ro
2019-11-06 22:31:16 +01:00
- ./proxy/config:/etc/config:ro
2019-11-26 21:07:43 +01:00
# autoconfig
2019-11-10 15:22:28 +01:00
- ./proxy/autoconfig:/srv/autoconfig:ro
2019-11-26 21:07:43 +01:00
# ssh deploy keys
2019-12-25 15:48:01 +01:00
- ${BASE_DIR:-/srv}/proxy/ssh:/root/deploy_keys:ro
2019-11-26 21:07:43 +01:00
# certs
2019-12-25 15:48:01 +01:00
- ${BASE_DIR:-/srv}/proxy/certs:/etc/caddycerts
2019-11-26 21:07:43 +01:00
# srv
2019-12-25 15:48:01 +01:00
- ${BASE_DIR:-/srv}/proxy/srv:/srv
2019-11-05 20:58:51 +01:00
networks:
- proxy
2019-12-04 22:00:55 +01:00
- reloader
2019-11-05 20:58:51 +01:00
echo:
image: jwilder/whoami
container_name: echo
2019-12-04 22:00:35 +01:00
restart: "${RESTART:-no}"
2019-12-05 22:37:25 +01:00
hostname: echo
domainname: ${BASE_DOMAIN}
2019-11-05 20:58:51 +01:00
networks:
- proxy