2023-02-18 01:23:11 +01:00
|
|
|
version: '3.7'
|
|
|
|
|
2023-02-18 15:25:31 +01:00
|
|
|
# https://hub.docker.com/r/woodpeckerci/woodpecker-server/
|
2023-02-18 01:23:11 +01:00
|
|
|
# https://woodpecker-ci.org/docs/administration/setup
|
|
|
|
# https://woodpecker-ci.org/docs/administration/server-config
|
2023-09-13 22:33:47 +02:00
|
|
|
# https://woodpecker-ci.org/docs/administration/forges/gitea
|
2023-02-18 01:23:11 +01:00
|
|
|
|
2023-02-18 15:25:31 +01:00
|
|
|
# auth callback /authorize
|
|
|
|
|
2023-02-18 01:23:11 +01:00
|
|
|
networks:
|
|
|
|
woodpecker:
|
|
|
|
|
|
|
|
services:
|
|
|
|
woodpecker:
|
2024-01-23 17:41:24 +01:00
|
|
|
image: woodpeckerci/woodpecker-server:v2.2.2-alpine
|
2023-02-18 01:23:11 +01:00
|
|
|
container_name: woodpecker
|
|
|
|
restart: "${RESTART:-no}"
|
|
|
|
hostname: ci
|
|
|
|
domainname: ${BASE_DOMAIN}
|
|
|
|
environment:
|
|
|
|
- WOODPECKER_HOST=https://ci.${BASE_DOMAIN}
|
|
|
|
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
|
|
|
- WOODPECKER_OPEN=true
|
|
|
|
|
|
|
|
- WOODPECKER_GITEA=true
|
|
|
|
- WOODPECKER_GITEA_URL=https://git.${BASE_DOMAIN}
|
|
|
|
- WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}
|
|
|
|
- WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}
|
|
|
|
|
|
|
|
- WOODPECKER_DATABASE_DRIVER=postgres
|
|
|
|
- WOODPECKER_DATABASE_DATASOURCE=postgres://woodpecker:${WOODPECKER_PG_PWD:-woodpecker}@pg-woodpecker:5432/woodpecker?sslmode=disable
|
2023-09-21 13:47:22 +02:00
|
|
|
|
2023-09-24 22:47:56 +02:00
|
|
|
- WOODPECKER_ADMIN=${WOODPECKER_ADMIN}
|
|
|
|
- WOODPECKER_DOCKER_CONFIG=/config/docker.json
|
|
|
|
volumes:
|
|
|
|
- ./woodpecker/docker-config.json:/config/docker.json:ro
|
2023-02-18 01:23:11 +01:00
|
|
|
depends_on:
|
|
|
|
- pg-woodpecker
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- woodpecker
|
|
|
|
|
|
|
|
woodpecker-agent:
|
2024-01-03 17:03:24 +01:00
|
|
|
image: woodpeckerci/woodpecker-agent:v2.1.1-alpine
|
2023-02-18 01:23:11 +01:00
|
|
|
command: agent
|
|
|
|
container_name: woodpecker-agent
|
|
|
|
restart: "${RESTART:-no}"
|
|
|
|
hostname: runner
|
|
|
|
domainname: ${BASE_DOMAIN}
|
|
|
|
environment:
|
|
|
|
- WOODPECKER_SERVER=woodpecker:9000
|
|
|
|
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
2024-01-03 13:36:08 +01:00
|
|
|
- WOODPECKER_AGENT_CONFIG_FILE=/config/agent.conf
|
2024-01-03 17:47:01 +01:00
|
|
|
- WOODPECKER_BACKEND_DOCKER_VOLUMES=/etc/timezone:/etc/timezone:ro,${BASE_DIR:-/srv}/watchtower:/ci
|
2023-02-18 01:23:11 +01:00
|
|
|
volumes:
|
2024-01-03 13:36:08 +01:00
|
|
|
- ${BASE_DIR:-/srv}/woodpecker/agent:/config
|
2023-02-18 01:23:11 +01:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
depends_on:
|
|
|
|
- woodpecker
|
|
|
|
networks:
|
|
|
|
- woodpecker
|
|
|
|
|
|
|
|
pg-woodpecker:
|
2024-01-03 18:56:26 +01:00
|
|
|
image: postgres:16-alpine
|
2023-02-18 01:23:11 +01:00
|
|
|
container_name: pg-woodpecker
|
|
|
|
restart: "${RESTART:-no}"
|
|
|
|
environment:
|
|
|
|
- POSTGRES_DB=woodpecker
|
|
|
|
- POSTGRES_USER=woodpecker
|
|
|
|
- POSTGRES_PASSWORD=${WOODPECKER_PG_PWD:-woodpecker}
|
|
|
|
volumes:
|
|
|
|
- ${BASE_DIR:-/srv}/woodpecker/psql:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- woodpecker
|