You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
---
|
|
|
|
traefik_id: "{{ inventory_hostname }}-traefik"
|
|
|
|
traefik_environment_digitalocean: [
|
|
'DO_AUTH_TOKEN: "{% if traefik_dns_01_challenge %}{{ digitalocean_authentication_token }}{% else %}{% endif %}"',
|
|
]
|
|
traefik_environment_hetzner: [
|
|
'HETZNER_API_KEY: "{% if traefik_dns_01_challenge %}{{ hetzner_dns_api_key }}{% else %}{% endif %}"',
|
|
]
|
|
traefik_environment_dns: "{{ traefik_environment_digitalocean if dns == 'digitalocean' else traefik_environment_hetzner if dns == 'hetzner' else [] }}"
|
|
|
|
traefik_docker: {
|
|
networks: [
|
|
{
|
|
name: front-tier,
|
|
external: 'true',
|
|
},
|
|
],
|
|
services: [
|
|
{
|
|
name: "{{ traefik_id }}",
|
|
image_name: "{{ traefik_image_name }}",
|
|
image_version: "{{ traefik_version }}",
|
|
environment: "{{ traefik_environment_dns }}",
|
|
volumes: [
|
|
'"./acme.json:/acme.json"',
|
|
'"./traefik.toml:/traefik.toml:ro"',
|
|
'"./traefik_dynamic.toml:/traefik_dynamic.toml:ro"',
|
|
'"/var/run/docker.sock:/var/run/docker.sock:ro"',
|
|
'"./config/static_files:/var/www/static_files:ro"',
|
|
],
|
|
networks: [
|
|
'"front-tier"'
|
|
],
|
|
ports: [
|
|
{
|
|
external: "0.0.0.0:{{ http_port }}",
|
|
internal: "{{ http_port }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ https_port }}",
|
|
internal: "{{ https_port }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ service_port_git }}",
|
|
internal: "{{ service_port_git }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ service_port_pgadmin }}",
|
|
internal: "{{ service_port_pgadmin }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ service_port_phpmyadmin }}",
|
|
internal: "{{ service_port_phpmyadmin }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ admin_port_traefik }}",
|
|
internal: "{{ admin_port_traefik }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ admin_port_service }}",
|
|
internal: "{{ admin_port_service }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ monitor_port_docker }}",
|
|
internal: "{{ monitor_port_docker }}"
|
|
},
|
|
{
|
|
external: "0.0.0.0:{{ monitor_port_harbor }}",
|
|
internal: "{{ monitor_port_harbor }}"
|
|
},
|
|
],
|
|
}
|
|
]
|
|
}
|