docker-deploy/drone/docker-compose.yml

64 lines
2.3 KiB
YAML
Raw Permalink Normal View History

2021-12-03 23:45:25 +08:00
version: "3.9"
services:
drone-server:
image: esinio/drone:v2.5.0
env_file:
- ./.env
environment:
- "TZ=Asia/Shanghai"
- "DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}"
- "DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}"
- "DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER}"
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- "DRONE_SERVER_HOST=${DRONE_SERVER_HOST}"
- "DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO}"
- "DRONE_DATABASE_DRIVER=${DRONE_DATABASE_DRIVER}"
- "DRONE_DATABASE_DATASOURCE=${DRONE_DATABASE_DATASOURCE}"
- "DRONE_DATABASE_SECRET=${DRONE_DATABASE_SECRET}"
- "DRONE_USER_CREATE=${DRONE_USER_CREATE}"
- "DRONE_USER_FILTER=${DRONE_USER_FILTER}"
- "DRONE_LOGS_DEBUG=${DRONE_LOGS_DEBUG}"
2021-12-03 23:45:25 +08:00
volumes:
- "./data:/data"
2021-12-03 23:45:25 +08:00
labels:
- "traefik.enable=true"
- "traefik.http.routers.dronesrv.rule=Host(`${DRONE_SERVER_HOST}`)"
- "traefik.http.routers.dronesrv.entrypoints=websecure"
- "traefik.http.routers.dronesrv.tls=true"
- "traefik.http.routers.dronesrv.middlewares=dronesrv-mw"
- "traefik.http.middlewares.dronesrv-mw.compress=true"
- "traefik.http.middlewares.dronesrv-mw.compress.excludedcontenttypes=text/event-stream"
- "traefik.http.services.dronesrv.loadbalancer.server.port=80"
2021-12-03 23:45:25 +08:00
external_links:
- postgresql
networks:
- traefik
- database
2021-12-03 23:45:25 +08:00
drone-runner-docker:
image: drone/drone-runner-docker:1
environment:
- "DRONE_RPC_HOST=${DRONE_SERVER_HOST}"
- "DRONE_RPC_PROTO=${DRONE_SERVER_PROTO}"
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- "DRONE_RUNNER_CAPACITY=${DRONE_RUNNER_CAPACITY}"
- "DRONE_RUNNER_NAME=${DRONE_RUNNER_DOCKER_NAME}"
- "DRONE_UI_USERNAME=${DRONE_UI_USERNAME}"
- "DRONE_UI_PASSWORD=${DRONE_UI_PASSWORD}"
- "DRONE_DEBUG=true"
- "DRONE_TRACE=true"
- "DRONE_RPC_DUMP_HTTP=true"
- "DRONE_RPC_DUMP_HTTP_BODY=true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.drone-runner-docker.rule=Host(`${DRONE_RUNNER_DOCKER_HOST}`)"
- "traefik.http.routers.drone-runner-docker.entrypoints=websecure"
- "traefik.http.routers.drone-runner-docker.tls=true"
2021-12-03 23:45:25 +08:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- traefik
networks:
traefik:
external: true
database:
2021-12-03 23:45:25 +08:00
external: true