Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@prologic
Created November 25, 2017 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/ddd39faba96618ec802d079517359104 to your computer and use it in GitHub Desktop.
Save prologic/ddd39faba96618ec802d079517359104 to your computer and use it in GitHub Desktop.
version: "3.3"
services:
drone-server:
image: drone/drone:latest
ports:
- "10.0.0.10:9000:9000/tcp"
environment:
- DRONE_DEBUG=true
- DRONE_OPEN=true
- DRONE_HOST=https://ci.mydomain.com
- DRONE_GOGS=true
- DRONE_GOGS_PRIVATE_MODE=true
- DRONE_GOGS_URL=https://git.mydomain.com
- DRONE_SECRET=###
- DRONE_ADMIN=###
networks:
- traefik
volumes:
- dronedata:/var/lib/drone
deploy:
placement:
constraints:
- "node.hostname == node1.mydomain.com"
labels:
- "traefik.enable=true"
- "traefik.port=8000"
- "traefik.backend=ci"
- "traefik.docker.network=traefik"
- "traefik.frontend.rule=Host:ci.mydomain.com"
restart_policy:
condition: on-failure
replicas: 1
drone-agent:
image: drone/agent:latest
command: agent
networks:
- bridge
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_DEBUG=true
- DRONE_SERVER=10.0.0.10:9000
- DRONE_SECRET=###
deploy:
placement:
constraints:
- "node.role != manager"
restart_policy:
condition: on-failure
replicas: 3
networks:
bridge:
external: true
traefik:
external: true
volumes:
dronedata:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment