This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
self-hosting/woodpecker/docker-compose.yml

70 lines
1.7 KiB
YAML

version: '2.4'
services:
# The main drone instance
app:
# Latest version as of writing this document
image: 'laszlocloud/woodpecker-server:v0.12.0'
restart: 'always'
depends_on:
db:
condition: 'service_healthy'
healthcheck:
test: 'curl -f http://localhost:8000/ || exit 1'
interval: '30s'
retries: 3
timeout: '5s'
start_period: '10s'
env_file:
- '.env'
networks:
- 'default'
- 'nginx'
ports:
# Used to communicate with the agents (I think)
- '9000:9000'
volumes:
- 'server-data:/var/lib/drone'
# Database for the server
db:
image: 'postgres:13.2-alpine'
restart: 'always'
healthcheck:
test: 'pg_isready -U woodpecker'
interval: '30s'
timeout: '5s'
retries: 3
start_period: '0s'
environment:
- 'POSTGRES_DB=woodpecker'
- 'POSTGRES_USER=woodpecker'
- 'POSTGRES_PASSWORD=woodpecker'
volumes:
- 'db-data:/var/lib/postgresql/data'
# We can deploy more agents by using the scale command
# Each agent can do one parallel build by default
agent:
image: 'laszlocloud/woodpecker-server:v0.12.0'
restart: 'always'
command: 'agent'
depends_on:
app:
condition: 'service_healthy'
environment:
- 'DRONE_SERVER=${DRONE_HOST}'
- 'DRONE_SECRET=${DRONE_SECRET}'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
volumes:
db-data:
server-data: