ansible/roles/stacks/composes/inventory/registry.yml

43 lines
1.4 KiB
YAML
Raw Normal View History

2023-09-25 08:40:20 +00:00
# 2023-09-25
# Stack: registry
---
registry:
name: "registry"
tasks:
- registry.yml
ipv6: true
traefik: true
directories:
- "{{ stack_folder_conf }}/registry/conf"
- "{{ stack_folder_datas }}/registry/datas"
services:
- name: "registry"
image: "registry:latest"
restart: "always"
ports:
- { exposed: "${VM_PORT_REGISTRY}", container: "5443" }
healthcheck: 'wget --no-verbose --tries=1 --spider --no-check-certificat https://0.0.0.0:5443/ || exit 1'
environment:
- { name: "REGISTRY_HTTP_ADDR", value: "0.0.0.0:5443" }
- { name: "REGISTRY_HTTP_TLS_CERTIFICATE", value: "{{ tls_certificate_path }}" }
- { name: "REGISTRY_HTTP_TLS_KEY", value: "{{ tls_private_key_path }}" }
ressources:
memory: 1G
volumes:
- { local: './{{ stack_folder_conf }}/registry/conf/config.yml', container: '/etc/docker/registry/config.yml', mode: 'ro' }
- { local: './{{ stack_folder_datas }}/registry/datas', container: '/var/lib/registry', mode: 'rw' }
traefik:
routers:
- {
name: "registry",
rule: "Host(`{{ vm_subdomain_registry }}.{{ vm_internet_domain }}`)",
middlewares: "nowaf@file",
service: "registry@docker"
}
services:
- { name: "registry", port: "5443", scheme: "https" }