Created
February 25, 2018 04:37
-
-
Save MrCoffey/5a662f28fe66d682a3f4e3b4c4514478 to your computer and use it in GitHub Desktop.
Drone.io configuration file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
lb: | |
image: traefik:1.4.5 | |
logging: | |
driver: json-file | |
options: | |
max-size: "10m" | |
max-file: "3" | |
command: | |
- "--graceTimeOut=5s" | |
- "--logLevel=info" | |
- "--defaultentrypoints=http,https" | |
- "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https" | |
- "--entryPoints=Name:https Address::443 TLS" | |
- "--web" | |
- "--docker" | |
- "--docker.domain=yourdomain.com" | |
- "--docker.swarmmode=true" | |
- "--docker.exposedbydefault=false" | |
- "--acme" | |
#- "--acme.caServer=https://acme-staging.api.letsencrypt.org/directory" | |
- "[email protected]" | |
- "--acme.entryPoint=https" | |
- "--acme.onhostrule=true" | |
- "--acme.storage=/etc/traefik/acme/acme.json" | |
volumes: | |
- "/var/run/docker.sock:/var/run/docker.sock" | |
- "/dev/null:/traefik.toml" | |
- "/opt/docker_data/traefik/:/etc/traefik/acme" | |
networks: | |
- gateway | |
ports: | |
- "80:80/tcp" | |
- "443:443/tcp" | |
deploy: | |
mode: replicated | |
replicas: 1 | |
update_config: | |
parallelism: 1 | |
delay: 10s | |
failure_action: pause | |
order: start-first | |
monitor: 30s | |
restart_policy: | |
condition: on-failure | |
max_attempts: 3 | |
drone-server: | |
image: drone/drone | |
logging: | |
driver: json-file | |
options: | |
max-size: "5m" | |
max-file: "3" | |
environment: | |
- DRONE_DEBUG=true | |
- DRONE_OPEN=false | |
- DRONE_GITHUB=true | |
- DRONE_ADMIN=_HIDDEN_ | |
- DRONE_GITHUB_URL=https://github.com | |
- DRONE_GITHUB_CLIENT=_HIDDEN_ | |
- DRONE_GITHUB_SECRET=_HIDDEN_ | |
- DRONE_GITHUB_CONTEXT=continuous-integration/drone | |
- DRONE_GITHUB_SCOPE=repo,repo:status,user:email,read:org | |
- DRONE_HOST=https://drone.yourdomain.com | |
- DRONE_SECRET=_HIDDEN_ | |
volumes: | |
- drone-sqlite:/var/lib/drone/ | |
networks: | |
- gateway | |
- ci | |
deploy: | |
placement: | |
constraints: | |
- node.role!=manager | |
labels: | |
- "traefik.backend=drone" | |
- "traefik.frontend.rule=Host:drone.yourdomain.com" | |
- "traefik.port=8000" | |
- "traefik.docker.network=ci_gateway" | |
- "traefik.enable=true" | |
endpoint_mode: dnsrr | |
mode: replicated | |
replicas: 1 | |
update_config: | |
parallelism: 1 | |
delay: 10s | |
failure_action: pause | |
order: start-first | |
monitor: 10s | |
restart_policy: | |
condition: on-failure | |
delay: 5s | |
max_attempts: 3 | |
drone-agent: | |
image: drone/agent | |
command: agent | |
logging: | |
driver: json-file | |
options: | |
max-size: "5m" | |
max-file: "3" | |
depends_on: | |
- drone-server | |
environment: | |
- DRONE_DEBUG=true | |
- DRONE_SERVER=drone-server:9000 | |
- DRONE_SECRET=_HIDDEN_ | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
networks: | |
- ci | |
deploy: | |
placement: | |
constraints: | |
- node.role!=manager | |
preferences: | |
- spread: node.labels.ci | |
mode: replicated | |
replicas: 10 | |
update_config: | |
parallelism: 2 | |
delay: 10s | |
failure_action: pause | |
order: start-first | |
monitor: 10s | |
restart_policy: | |
condition: on-failure | |
delay: 5s | |
max_attempts: 3 | |
volumes: | |
drone-sqlite: | |
networks: | |
gateway: | |
ci: | |
# docker stack deploy -c docker-compose.yml ci |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment