Simplify woodpecker.yml and change restart-policy to always

This commit is contained in:
Sam A. 2023-01-22 19:20:17 +01:00
parent a70306f325
commit abba932693
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,18 +1,18 @@
# vim: ft=yaml.ansible # vim: ft=yaml.ansible
--- ---
- name: set up woodpecker with docker runner - name: Set up Woodpecker CI with Docker runner
docker_compose: docker_compose:
project_name: woodpecker project_name: woodpecker
pull: yes pull: true
definition: definition:
version: "3.6" version: "3.8"
services: services:
woodpecker-server: server:
image: "woodpeckerci/woodpecker-server:{{ services.woodpecker.server_version }}" image: "woodpeckerci/woodpecker-server:{{ services.woodpecker.server_version }}"
restart: unless-stopped restart: always
networks: networks:
- default
- external_services - external_services
- woodpecker
volumes: volumes:
- "{{ services.woodpecker.volume_folder }}:/data" - "{{ services.woodpecker.volume_folder }}:/data"
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
@ -23,24 +23,19 @@
WOODPECKER_GITEA_SECRET: "{{ woodpecker_secrets.oauth_client_secret }}" WOODPECKER_GITEA_SECRET: "{{ woodpecker_secrets.oauth_client_secret }}"
WOODPECKER_HOST: "https://{{ services.woodpecker.domain }}" WOODPECKER_HOST: "https://{{ services.woodpecker.domain }}"
WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}" WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}"
VIRTUAL_HOST: "{{ services.woodpecker.domain }}" VIRTUAL_HOST: "{{ services.woodpecker.domain }}"
LETSENCRYPT_HOST: "{{ services.woodpecker.domain }}" LETSENCRYPT_HOST: "{{ services.woodpecker.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
woodpecker-agent: agent:
image: "woodpeckerci/woodpecker-agent:{{ services.woodpecker.agent_version }}" image: "woodpeckerci/woodpecker-agent:{{ services.woodpecker.agent_version }}"
restart: unless-stopped restart: always
networks:
- woodpecker
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
environment: environment:
WOODPECKER_SERVER: "woodpecker-server:9000" WOODPECKER_SERVER: "server:9000"
WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}" WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}"
networks: networks:
woodpecker:
external_services: external_services:
external: external: true
name: external_services