container-server/services/drone/docker-compose.yml
Carsten Sprung ecfbce28d3 setup-docs (#1)
- Add documentation about host setup
- Refactor task files
- Improve documentation

Reviewed-on: carsten/docker-server#1
2022-11-13 00:10:26 +00:00

66 lines
1.7 KiB
YAML

version: '3.7'
# https://docs.drone.io/
networks:
drone:
drone-runner:
services:
drone:
image: drone/drone:1
container_name: drone
restart: "${RESTART:-no}"
hostname: ci
domainname: ${BASE_DOMAIN}
environment:
- DRONE_SERVER_PROTO=https
- DRONE_SERVER_HOST=ci.${BASE_DOMAIN}
- DRONE_AGENTS_ENABLED=true
- DRONE_USER_CREATE=username:${DRONE_ADMIN},admin:true
- DRONE_GITEA_SERVER=https://git.${BASE_DOMAIN}
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_DATABASE_DRIVER=postgres
- DRONE_DATABASE_DATASOURCE=postgres://drone:${DRONE_PG_PWD:-drone}@pg-drone:5432/drone?sslmode=disable
volumes:
- ${BASE_DIR:-/srv}/drone/data:/data
depends_on:
- pg-drone
networks:
- proxy
- drone
pg-drone:
image: postgres:12-alpine
container_name: pg-drone
restart: "${RESTART:-no}"
environment:
- POSTGRES_DB=drone
- POSTGRES_USER=drone
- POSTGRES_PASSWORD=${DRONE_PG_PWD:-drone}
volumes:
- ${BASE_DIR:-/srv}/drone/psql:/var/lib/postgresql/data
networks:
- drone
drone-runner:
image: drone/drone-runner-docker:1
container_name: drone-runner
restart: "${RESTART:-no}"
hostname: runner
domainname: ${BASE_DOMAIN}
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST=ci.${BASE_DOMAIN}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=runner.${BASE_DOMAIN}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- drone
networks:
- drone-runner