59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
|
version: "3.8"
|
||
|
|
||
|
networks:
|
||
|
drone-network:
|
||
|
external: true
|
||
|
traefik-network:
|
||
|
external: true
|
||
|
|
||
|
services:
|
||
|
drone-runner-service:
|
||
|
image: docker.io/drone/drone-runner-docker:1
|
||
|
hostname: drone-runner-service-host
|
||
|
tty: true
|
||
|
environment:
|
||
|
##- DRONE_RPC_PROTO=https
|
||
|
##- DRONE_RPC_HOST=ci.miflux.com
|
||
|
- DRONE_RPC_PROTO=http
|
||
|
- DRONE_RPC_HOST=drone-service-host
|
||
|
- DRONE_RPC_PORT=:80
|
||
|
- DRONE_RPC_SECRET=bd7c7058fd60caa00b86f7ea944c913d
|
||
|
- DRONE_RUNNER_CAPACITY=10
|
||
|
- DRONE_RUNNER_NAME=drone-runner-docker-1
|
||
|
- DS_NODE_NAME="{{.Node.Hostname}}"
|
||
|
- DS_SERVICE_NAME="{{.Service.Name}}"
|
||
|
- DS_TASK_NAME="{{.Task.Name}}"
|
||
|
networks:
|
||
|
- drone-network
|
||
|
##- traefik-network
|
||
|
volumes:
|
||
|
- type: bind
|
||
|
source: /var/run/docker.sock
|
||
|
target: /var/run/docker.sock
|
||
|
# - type: bind
|
||
|
# source: /etc/timezone
|
||
|
# target: /etc/timezone
|
||
|
# read_only: true
|
||
|
# - type: bind
|
||
|
# source: /etc/localtime
|
||
|
# target: /etc/localtime
|
||
|
# read_only: true
|
||
|
#ports:
|
||
|
# - target: 3000
|
||
|
# published: 3000
|
||
|
# protocol: tcp
|
||
|
deploy:
|
||
|
mode: global
|
||
|
##mode: replicated
|
||
|
##replicas: 3
|
||
|
##placement:
|
||
|
##max_replicas_per_node: 1
|
||
|
##constraints:
|
||
|
## - node.labels.location == home
|
||
|
## - node.hostname == rose
|
||
|
resources:
|
||
|
limits:
|
||
|
memory: 1GB
|
||
|
restart_policy:
|
||
|
condition: on-failure
|