2023-01-21 23:28:47 +00:00
|
|
|
# vim: ft=yaml.ansible
|
|
|
|
---
|
2023-01-22 18:20:17 +00:00
|
|
|
- name: Set up Woodpecker CI with Docker runner
|
2023-01-21 23:28:47 +00:00
|
|
|
docker_compose:
|
|
|
|
project_name: woodpecker
|
2023-01-22 18:20:17 +00:00
|
|
|
pull: true
|
2023-01-21 23:28:47 +00:00
|
|
|
definition:
|
2023-01-22 18:20:17 +00:00
|
|
|
version: "3.8"
|
2023-01-21 23:28:47 +00:00
|
|
|
services:
|
2023-01-22 18:20:17 +00:00
|
|
|
server:
|
2023-01-21 23:28:47 +00:00
|
|
|
image: "woodpeckerci/woodpecker-server:{{ services.woodpecker.server_version }}"
|
2023-01-22 18:20:17 +00:00
|
|
|
restart: always
|
2023-01-21 23:28:47 +00:00
|
|
|
networks:
|
2023-01-22 18:20:17 +00:00
|
|
|
- default
|
2023-01-21 23:28:47 +00:00
|
|
|
- external_services
|
|
|
|
volumes:
|
|
|
|
- "{{ services.woodpecker.volume_folder }}:/data"
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
|
|
environment:
|
|
|
|
WOODPECKER_GITEA: "true"
|
|
|
|
WOODPECKER_GITEA_URL: "https://{{ services.gitea.domain }}"
|
|
|
|
WOODPECKER_GITEA_CLIENT: "{{ woodpecker_secrets.oauth_client_id }}"
|
|
|
|
WOODPECKER_GITEA_SECRET: "{{ woodpecker_secrets.oauth_client_secret }}"
|
|
|
|
WOODPECKER_HOST: "https://{{ services.woodpecker.domain }}"
|
|
|
|
WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}"
|
|
|
|
VIRTUAL_HOST: "{{ services.woodpecker.domain }}"
|
|
|
|
LETSENCRYPT_HOST: "{{ services.woodpecker.domain }}"
|
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
|
|
|
|
2023-01-22 18:20:17 +00:00
|
|
|
agent:
|
2023-01-21 23:28:47 +00:00
|
|
|
image: "woodpeckerci/woodpecker-agent:{{ services.woodpecker.agent_version }}"
|
2023-01-22 18:20:17 +00:00
|
|
|
restart: always
|
2023-01-21 23:28:47 +00:00
|
|
|
volumes:
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
|
|
environment:
|
2023-01-22 18:20:17 +00:00
|
|
|
WOODPECKER_SERVER: "server:9000"
|
2023-01-21 23:28:47 +00:00
|
|
|
WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
external_services:
|
2023-01-22 18:20:17 +00:00
|
|
|
external: true
|