infra/playbooks/roles/drone/templates/docker-compose.yml.j2

33 lines
1.1 KiB
Django/Jinja

version: '3'
services:
drone:
container_name: drone
image: drone/drone:latest
volumes:
- ./drone:/data
ports:
- "127.0.0.1:2201:80"
environment:
- DRONE_GITEA_SERVER={{ drone_gitea_server }}
- DRONE_GITEA_CLIENT_ID={{ drone_gitea_client_id }}
- DRONE_GITEA_CLIENT_SECRET={{ drone_gitea_client_secret }}
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_SERVER_PROTO=https
- DRONE_SERVER_HOST={{ drone_server_host }}
- DRONE_RPC_SECRET={{ drone_rpc_secret }}
- DRONE_USER_CREATE=username:{{ drone_admin_username }},admin:true
drone-runner:
container_name: drone_runner
image: drone/drone-runner-docker:latest
userns_mode: 'host' # Needed to get access to docker socket
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_SECRET={{ drone_rpc_secret }}
- DRONE_RPC_HOST=drone:80
- DRONE_RPC_PROTO=http
- DRONE_RUNNER_CAPACITY={{ drone_workers }}
- DRONE_CPU_QUOTA={{ drone_cpu_quota }}
- DRONE_MEMORY_LIMIT={{ drone_memory_limit }}