docker-mirror/docker-compose.yml

54 lines
1.9 KiB
YAML

version: "3.7"
services:
nginx:
image: nginx:mainline-alpine
container_name: nginx
hostname: ${DOMAIN_NAME:?err}
volumes:
- './http-root:/var/lib/nginx/html/http-root:ro'
- './data/acme-webroot:/var/lib/nginx/html/acme:ro'
- './data/letsencrypt/etc:/etc/letsencrypt:ro'
- './preset/nginx.conf:/etc/nginx/nginx.conf:ro'
- './preset/conf.d:/etc/nginx/conf.d:ro'
labels:
com.datadoghq.ad.check_names: '["nginx"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"nginx_status_url": "http://%%host%%:81/nginx_status/"}]'
ports:
- '80:80'
- '443:443'
restart: ${RESTART:-unless-stopped}
syncthing:
image: syncthing/syncthing:latest
container_name: syncthing
hostname: ${DOMAIN_NAME:?err}
environment:
- PUID=1000
- PGID=1000
volumes:
- './data/syncthing:/var/syncthing/config'
- './http-root/chaotic-aur:/repo'
ports:
- '127.0.0.1:8384:8384'
- 22000:22000/tcp
- 22000:22000/udp
- 21027:21027/udp
restart: ${RESTART:-unless-stopped}
chaotic-management:
container_name: chaotic-management
restart: ${RESTART:-unless-stopped}
image: nginx
entrypoint: "/bin/sh -c 'trap exit TERM; sleep 10; while :; do curl -X POST -H \"X-API-Key: ${SYNCTHING_API_KEY:-XYZ}\" http://syncthing:8384/rest/db/revert?folder=jhcrt-m2dra; sleep 1h & wait $${!}; done;'"
certbot:
image: certbot/certbot:${LETSENCRYPT_TAG:-latest}
container_name: certbot
volumes:
- './data/acme-webroot:/srv/http/webroot'
- './data/letsencrypt/etc:/etc/letsencrypt'
- './data/letsencrypt/var:/var/lib/letsencrypt'
entrypoint: "/bin/sh -c 'trap exit TERM; sleep 10; while :; do certbot renew -w /srv/http/webroot/ --webroot; sleep 12h & wait $${!}; done;'"
restart: ${RESTART:-unless-stopped}