drone/templates/docker-compose.yml.j2
2021-04-05 21:59:39 +02:00

44 lines
1.4 KiB
Django/Jinja

version: '3'
services:
nginx:
image: nginx:1.15-alpine
restart: unless-stopped
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
drone:
image: drone/drone:1
environment:
- DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER}
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_SERVER_HOST={{ inventory_hostname }}
- DRONE_SERVER_PROTO=https
restart: always
drone-runner:
image: drone/drone-runner-docker:1
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST={{ inventory_hostname }}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RPC_SKIP_VERIFY=true
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=drone-runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always