Include woodpecker ci provisioning

This commit is contained in:
Sonny Bakker 2025-04-27 18:07:24 +02:00
parent 0d7666185c
commit 295f497bcf
6 changed files with 140 additions and 2 deletions

View file

@ -24,6 +24,6 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_pass http://{{ woodpecker_ip }}:{{ woodpecker_port }};
proxy_pass http://{{ woodpecker_ip }}:{{ woodpecker_app_port }};
}
}

View file

@ -0,0 +1,50 @@
# {{ ansible_managed }}
services:
woodpecker-server:
image: {{ woodpecker_image_tag }}
restart: always
ports:
- '{{ woodpecker_app_port }}:8000'
volumes:
- woodpecker-server-data:/var/lib/woodpecker/
depends_on:
- db
environment:
WOODPECKER_OPEN: true
WOODPECKER_HOST: 'https://{{ woodpecker_domain }}'
WOODPECKER_AGENT_SECRET: {{ woodpecker_agent_secret }}
WOODPECKER_DATABASE_DRIVER: postgres
WOODPECKER_DATABASE_DATASOURCE: postgres://{{ woodpecker_postgres_user }}:{{ woodpecker_postgres_password }}@db:5432/postgres?sslmode=disable
WOODPECKER_FORGEJO: true
WOODPECKER_FORGEJO_URL: {{ woodpecker_forgejo_url }}
WOODPECKER_FORGEJO_CLIENT: {{ woodpecker_forgejo_client }}
WOODPECKER_FORGEJO_SECRET: {{ woodpecker_forgejo_secret }}
db:
image: postgres:17
restart: always
environment:
POSTGRES_USER: {{ woodpecker_postgres_user }}
POSTGRES_PASSWORD: {{ woodpecker_postgres_password }}
POSTGRES_DB: {{ woodpecker_postgres_name }}
volumes:
- postgres-data:/var/lib/postgresql/data
woodpecker-agent:
image: {{ woodpecker_agent_tag }}
command: agent
restart: always
depends_on:
- woodpecker-server
volumes:
- woodpecker-agent-config:/etc/woodpecker
- /var/run/docker.sock:/var/run/docker.sock
environment:
WOODPECKER_SERVER: woodpecker-server:9000
WOODPECKER_AGENT_SECRET: {{ woodpecker_agent_secret }}
volumes:
woodpecker-server-data:
woodpecker-agent-config:
postgres-data: