2019-11-05 20:58:51 +01:00
|
|
|
version: '3.7'
|
|
|
|
|
2019-11-10 21:50:43 +01:00
|
|
|
# https://docs.drone.io/
|
|
|
|
|
2019-11-05 20:58:51 +01:00
|
|
|
networks:
|
|
|
|
drone:
|
2019-11-10 21:50:43 +01:00
|
|
|
drone-runner:
|
2019-11-05 20:58:51 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
drone:
|
|
|
|
image: drone/drone:1
|
|
|
|
container_name: drone
|
2019-12-04 22:00:35 +01:00
|
|
|
restart: "${RESTART:-no}"
|
2019-12-05 22:37:25 +01:00
|
|
|
hostname: ci
|
|
|
|
domainname: ${BASE_DOMAIN}
|
2019-11-05 20:58:51 +01:00
|
|
|
environment:
|
2019-11-10 21:50:43 +01:00
|
|
|
- DRONE_SERVER_PROTO=https
|
|
|
|
- DRONE_SERVER_HOST=ci.${BASE_DOMAIN}
|
2019-11-05 20:58:51 +01:00
|
|
|
- DRONE_AGENTS_ENABLED=true
|
2019-11-10 21:50:43 +01:00
|
|
|
- DRONE_USER_CREATE=username:${DRONE_ADMIN},admin:true
|
2019-11-05 20:58:51 +01:00
|
|
|
- DRONE_GITEA_SERVER=https://git.${BASE_DOMAIN}
|
2019-11-10 21:50:43 +01:00
|
|
|
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
|
|
|
|
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
|
2019-12-04 22:00:35 +01:00
|
|
|
- DRONE_GIT_ALWAYS_AUTH=true
|
2019-11-10 21:50:43 +01:00
|
|
|
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
2019-11-05 20:58:51 +01:00
|
|
|
- DRONE_DATABASE_DRIVER=postgres
|
2019-12-07 23:40:51 +01:00
|
|
|
- DRONE_DATABASE_DATASOURCE=postgres://drone:${DRONE_PG_PWD:-drone}@pg-drone:5432/drone?sslmode=disable
|
2019-11-05 20:58:51 +01:00
|
|
|
volumes:
|
2019-12-25 15:48:01 +01:00
|
|
|
- ${BASE_DIR:-/srv}/drone/data:/data
|
2019-11-05 20:58:51 +01:00
|
|
|
depends_on:
|
|
|
|
- pg-drone
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- drone
|
|
|
|
|
|
|
|
pg-drone:
|
2022-12-11 23:24:48 +01:00
|
|
|
image: postgres:${POSTGRES_VERSION}-alpine
|
2019-11-05 20:58:51 +01:00
|
|
|
container_name: pg-drone
|
2019-12-04 22:00:35 +01:00
|
|
|
restart: "${RESTART:-no}"
|
2019-11-05 20:58:51 +01:00
|
|
|
environment:
|
|
|
|
- POSTGRES_DB=drone
|
2019-12-07 23:40:51 +01:00
|
|
|
- POSTGRES_USER=drone
|
2019-11-10 21:50:43 +01:00
|
|
|
- POSTGRES_PASSWORD=${DRONE_PG_PWD:-drone}
|
2019-11-05 20:58:51 +01:00
|
|
|
volumes:
|
2019-12-25 15:48:01 +01:00
|
|
|
- ${BASE_DIR:-/srv}/drone/psql:/var/lib/postgresql/data
|
2019-11-05 20:58:51 +01:00
|
|
|
networks:
|
|
|
|
- drone
|
|
|
|
|
|
|
|
drone-runner:
|
|
|
|
image: drone/drone-runner-docker:1
|
|
|
|
container_name: drone-runner
|
2019-12-04 22:00:35 +01:00
|
|
|
restart: "${RESTART:-no}"
|
2019-12-05 22:37:25 +01:00
|
|
|
hostname: runner
|
|
|
|
domainname: ${BASE_DOMAIN}
|
2019-11-05 20:58:51 +01:00
|
|
|
environment:
|
|
|
|
- DRONE_RPC_PROTO=https
|
|
|
|
- DRONE_RPC_HOST=ci.${BASE_DOMAIN}
|
2019-11-10 21:50:43 +01:00
|
|
|
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
2019-11-05 20:58:51 +01:00
|
|
|
- DRONE_RUNNER_CAPACITY=2
|
|
|
|
- DRONE_RUNNER_NAME=runner.${BASE_DOMAIN}
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
depends_on:
|
|
|
|
- drone
|
2019-11-10 21:50:43 +01:00
|
|
|
networks:
|
|
|
|
- drone-runner
|