Add simple ci deployment
This commit is contained in:
parent
3ee003f94c
commit
06bb34891e
6 changed files with 162 additions and 0 deletions
|
|
@ -56,9 +56,51 @@ services:
|
|||
- POSTGRES_PASSWORD={{ gitea_db_password }}
|
||||
- POSTGRES_DB={{ gitea_db_database }}
|
||||
|
||||
{% if gitea_use_ci %}
|
||||
wp-server:
|
||||
image: woodpeckerci/woodpecker-server:latest
|
||||
networks:
|
||||
- "{{ docker_swarm_public_network_name }}"
|
||||
- backend
|
||||
volumes:
|
||||
- woodpecker:/var/lib/woodpecker/
|
||||
environment:
|
||||
- WOODPECKER_OPEN=true
|
||||
- "WOODPECKER_HOST={{ (gitea_use_https == True) | ternary('https', 'http') }}://{{ (subdomain_ci_alias is not undefined and not none) | ternary(subdomain_ci_alias, stack_name + '_ci') }}.{{server_domain}}"
|
||||
- WOODPECKER_AGENT_SECRET={{ gitea_woodpecker_agent_secret }}
|
||||
{% if gitea_ci_github_client is not undefined and not None and gitea_ci_github_secret is not undefined and not None %}
|
||||
- WOODPECKER_GITHUB=true
|
||||
- WOODPECKER_GITHUB_CLIENT={{ gitea_ci_github_client }}
|
||||
- WOODPECKER_GITHUB_SECRET={{ gitea_ci_github_secret }}
|
||||
{% endif %}
|
||||
{% if gitea_ci_gitlab_client is not undefined and not None and gitea_ci_gitlab_secret is not undefined and not None %}
|
||||
- WOODPECKER_GITLAB=true
|
||||
- WOODPECKER_gitlab_CLIENT={{ gitea_ci_gitlab_client }}
|
||||
- WOODPECKER_gitlab_SECRET={{ gitea_ci_gitlab_secret }}
|
||||
{% endif %}
|
||||
{% if gitea_ci_gitea_client is not undefined and not None and gitea_ci_gitea_secret is not undefined and not None %}
|
||||
- WOODPECKER_GITEA=true
|
||||
- "WOODPECKER_GITEA_URL={{ (gitea_use_https == True) | ternary('https', 'http') }}://{{ (subdomain_alias is not undefined and not none) | ternary(subdomain_alias, stack_name) }}.{{server_domain}}"
|
||||
- WOODPECKER_GITEA_CLIENT={{ gitea_ci_gitea_client }}
|
||||
- WOODPECKER_GITEA_SECRET={{ gitea_ci_gitea_secret }}
|
||||
{% endif %}
|
||||
|
||||
wp-agent:
|
||||
image: woodpeckerci/woodpecker-agent:latest
|
||||
networks:
|
||||
- backend
|
||||
command: agent
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- WOODPECKER_SERVER=wp-server:9000
|
||||
- WOODPECKER_AGENT_SECRET={{ gitea_woodpecker_agent_secret }}
|
||||
{% endif %}
|
||||
|
||||
volumes:
|
||||
data:
|
||||
db:
|
||||
woodpecker:
|
||||
|
||||
networks:
|
||||
"{{ docker_swarm_public_network_name }}":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue