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

68 lines
1.6 KiB
YAML
Raw Normal View History

2021-04-20 15:52:30 +02:00
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'
2021-04-23 23:35:30 +02:00
env_file:
- '.env'
2021-04-20 15:52:30 +02:00
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:
2021-04-24 00:45:09 +02:00
image: 'laszlocloud/woodpecker-agent:v0.12.0'
2021-04-20 15:52:30 +02:00
restart: 'always'
command: 'agent'
depends_on:
2021-04-23 23:35:30 +02:00
app:
condition: 'service_healthy'
2021-04-20 15:52:30 +02:00
environment:
2021-04-24 00:45:09 +02:00
- 'DRONE_SERVER=${DRONE_SERVER}'
2021-04-20 15:52:30 +02:00
- 'DRONE_SECRET=${DRONE_SECRET}'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
2021-04-23 23:53:01 +02:00
networks:
nginx:
external: true
2021-04-20 15:52:30 +02:00
volumes:
db-data:
server-data: