Carsten Sprung
7f5755b537
- [x] This fixes services being not reachable from inside their own container - [x] Container name must be different to URL hostname Reviewed-on: #76
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
version: '3.7'
|
|
|
|
# https://hub.docker.com/r/woodpeckerci/woodpecker-server/
|
|
# https://woodpecker-ci.org/docs/administration/setup
|
|
# https://woodpecker-ci.org/docs/administration/server-config
|
|
# https://woodpecker-ci.org/docs/administration/forges/gitea
|
|
|
|
# auth callback /authorize
|
|
|
|
networks:
|
|
woodpecker:
|
|
|
|
services:
|
|
woodpecker:
|
|
image: woodpeckerci/woodpecker-server:v2.7.1-alpine
|
|
container_name: woodpecker
|
|
restart: "${RESTART:-no}"
|
|
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
|
|
|
|
- WOODPECKER_ADMIN=${WOODPECKER_ADMIN}
|
|
- WOODPECKER_DOCKER_CONFIG=/config/docker.json
|
|
volumes:
|
|
- ./woodpecker/docker-config.json:/config/docker.json:ro
|
|
depends_on:
|
|
- pg-woodpecker
|
|
networks:
|
|
- proxy
|
|
- woodpecker
|
|
|
|
woodpecker-agent:
|
|
image: woodpeckerci/woodpecker-agent:v2.7.1-alpine
|
|
command: agent
|
|
container_name: woodpecker-agent
|
|
restart: "${RESTART:-no}"
|
|
domainname: ${BASE_DOMAIN}
|
|
environment:
|
|
- WOODPECKER_SERVER=woodpecker:9000
|
|
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
|
- WOODPECKER_AGENT_CONFIG_FILE=/config/agent.conf
|
|
- WOODPECKER_BACKEND_DOCKER_VOLUMES=/etc/timezone:/etc/timezone:ro,${BASE_DIR:-/srv}/watchtower:/ci
|
|
volumes:
|
|
- ${BASE_DIR:-/srv}/woodpecker/agent:/config
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
depends_on:
|
|
- woodpecker
|
|
networks:
|
|
- woodpecker
|
|
|
|
pg-woodpecker:
|
|
image: postgres:16-alpine
|
|
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
|