-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 loc) · 1.48 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3'
services:
drone:
image: drone/drone:2
restart: always
volumes:
- /var/lib/drone:/data
environment:
{% for key, value in drone_env.items() %}
- {{ key }}={{ value }}
{% endfor %}
{% if filter %}
- DRONE_USER_FILTER={{admin}}{% if filtered_users |length %},{{filtered_users}}{% endif %}{% if filtered_orgs |length %},{{filtered_orgs}}{% endif %}
{% endif %}
labels:
- traefik.enable=true
- trafik.docker.network=web
- traefik.http.routers.drone.entryPoints=web
- traefik.http.routers.drone.rule=Host(`{{ url.split("/")[2] }}`)
- traefik.http.middlewares.drone-redirect.redirectregex.regex=^https?://{{ url.split("/")[2] }}/(.*)
- traefik.http.middlewares.drone-redirect.redirectregex.replacement=https://{{ url.split("/")[2] }}/$${1}
- traefik.http.routers.drone-ssl.middlewares=drone-redirect
- traefik.http.routers.drone.middlewares=drone-redirect
- traefik.http.routers.drone-ssl.rule=host(`{{ url.split("/")[2] }}`)
- traefik.http.routers.drone-ssl.tls.certResolver=leresolver
networks:
- web
- dronet
drone-runner:
image: drone/drone-runner-docker
restart: always
depends_on:
- drone
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
ports:
- "3000"
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- DRONE_RPC_SECRET={{ rpc_pass }}
- DRONE_RUNNER_CAPACITY=10
networks:
- web
networks:
web:
external: true