deployment/stacks/woodpecker.yml

81 lines
2.0 KiB
YAML
Raw Normal View History

2021-12-29 20:19:55 +01:00
version: '3.4'
services:
app:
2021-12-31 10:37:54 +01:00
image: 'woodpeckerci/woodpecker-server:test-647'
2021-12-29 20:19:55 +01:00
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==admin'
labels:
- 'traefik.enable=true'
2021-12-29 20:50:20 +01:00
- 'traefik.http.routers.woodpecker.rule=Host(`ci.rustybever.be`)'
- 'traefik.http.routers.woodpecker.tls=true'
- 'traefik.http.routers.woodpecker.tls.certresolver=letsEncrypt'
- 'traefik.http.services.woodpecker.loadbalancer.server.port=8000'
2021-12-29 20:19:55 +01:00
environment:
- 'WOODPECKER_OPEN=true'
2021-12-29 22:19:40 +01:00
- 'WOODPECKER_ADMIN=Chewing_Bever'
2021-12-29 20:48:32 +01:00
- 'WOODPECKER_HOST=https://ci.rustybever.be'
2021-12-29 20:19:55 +01:00
- 'WOODPECKER_DATABASE_DRIVER=postgres'
2021-12-29 22:16:39 +01:00
- 'WOODPECKER_DATABASE_DATASOURCE=postgres://woodpecker:woodpecker@db:5432/woodpecker?sslmode=disable'
2021-12-29 22:53:53 +01:00
- 'WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}'
2021-12-29 20:19:55 +01:00
- 'WOODPECKER_GITEA=true'
- 'WOODPECKER_GITEA_URL=https://git.rustybever.be'
2021-12-29 22:53:53 +01:00
- 'WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}'
- 'WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}'
2021-12-29 20:47:38 +01:00
networks:
- default
- public
2021-12-29 20:19:55 +01:00
db:
image: 'postgres:14.1-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==admin'
healthcheck:
2021-12-29 22:16:39 +01:00
test: pg_isready -U woodpecker -d woodpecker
2021-12-29 20:19:55 +01:00
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
environment:
2021-12-29 22:16:39 +01:00
- 'POSTGRES_USER=woodpecker'
2021-12-29 20:19:55 +01:00
- 'POSTGRES_PASSWORD=woodpecker'
- 'POSTGRES_DB=woodpecker'
volumes:
- 'db-data:/var/lib/postgresql/data'
agent:
image: 'woodpeckerci/woodpecker-agent:latest'
command: agent
deploy:
mode: 'global'
placement:
constraints:
- 'node.labels.class.ci==true'
environment:
2021-12-29 22:53:53 +01:00
- 'WOODPECKER_SERVER=app:9000'
- 'WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}'
2021-12-29 20:19:55 +01:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2021-12-29 20:47:38 +01:00
networks:
public:
external: true
2021-12-29 20:19:55 +01:00
volumes:
db-data: