drone/docker-compose.yml

79 lines
2.2 KiB
YAML
Raw Normal View History

2020-05-10 16:16:11 +00:00
version: "3.7"
services:
2020-05-10 20:36:23 +00:00
drone-server:
# drone server application
2020-05-10 16:16:11 +00:00
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
2020-05-10 20:36:23 +00:00
image: drone/drone:1.7.0
2020-05-10 16:16:11 +00:00
volumes:
2020-05-10 20:36:23 +00:00
- drone:/var/lib/drone
- drone-data:/data
environment:
- DRONE_LOGS_DEBUG=true
- DRONE_LOGS_PRETTY=true
- DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER}
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
- DRONE_SERVER_HOST=${DRONE_SERVER_HOST} # tunnel hostname
- DRONE_ADMIN=giles
- DRONE_SERVER_PROTO=https # tunnel adds https on top
- DRONE_SERVER_PORT=:8080
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_USER_CREATE=username:giles,admin:true
- DRONE_AGENTS_ENABLED=true
- DRONE_CONVERT_PLUGIN_ENDPOINT=http://drone-starlark:3000
- DRONE_CONVERT_PLUGIN_SECRET=${DRONE_CONVERT_SECRET}
2020-05-10 16:16:11 +00:00
networks:
- appnet
2020-05-10 20:04:43 +00:00
- externalnet
2020-05-10 20:36:23 +00:00
drone-docker-runner:
# drone runner performs builds
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: drone/drone-runner-docker:1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone-server:8080
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=8
- DRONE_RUNNER_NAME="docker-runner"
networks:
- appnet
drone-starlark:
# drone starlark server converts starlark to yaml
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: ${LOCAL_DOCKER_REGISTRY}drone-starlark
environment:
- DRONE_DEBUG=true
- DRONE_SECRET=${DRONE_CONVERT_SECRET}
- DRONE_STARLARK_REPO_PATHS=this:/repos
- SIGYL_STACK_NAME=$SIGYL_STACK_NAME
- SIGYL_STACK_ROOT=$SIGYL_STACK_ROOT
networks:
- appnet
2020-05-10 16:16:11 +00:00
volumes:
2020-05-10 20:36:23 +00:00
drone:
drone-data:
2020-05-10 16:16:11 +00:00
networks:
appnet:
driver: overlay
#external: true
externalnet:
driver: overlay
2020-05-10 20:36:23 +00:00
external: true