2023-09-26 16:09:27 +00:00
|
|
|
# 2023-09-26
|
2023-09-25 08:40:20 +00:00
|
|
|
# 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:
|
2023-09-26 16:09:27 +00:00
|
|
|
cpu: "{{ vm_os_cpu_max }}"
|
|
|
|
memory: "{{ 1.0 if 1.0 <= vm_os_memory_max|float else vm_os_memory_max|float }}G"
|
2023-09-25 08:40:20 +00:00
|
|
|
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" }
|