2020-05-11 15:05:39 +00:00
|
|
|
---
|
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
registry:
|
2020-05-11 15:07:27 +00:00
|
|
|
image: "registry:2"
|
|
|
|
ports:
|
|
|
|
- "5000:5000"
|
|
|
|
volumes:
|
|
|
|
- "registry:/var/lib/registry"
|
2020-05-11 15:05:39 +00:00
|
|
|
networks:
|
2020-05-11 16:34:43 +00:00
|
|
|
- proxy
|
|
|
|
configs:
|
|
|
|
- source: config-yml-prod-v1
|
|
|
|
target: /etc/docker/registry/config.yml
|
2020-05-11 15:05:39 +00:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.role == manager
|
2020-05-11 16:34:43 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.services.registry.loadbalancer.server.port=5000"
|
|
|
|
- "traefik.http.routers.registry.rule=Host(`registry.swarm.autonomic.zone`)"
|
|
|
|
- "traefik.http.routers.registry.entrypoints=web-secure"
|
|
|
|
- "traefik.http.routers.registry.tls.certresolver=production"
|
2020-05-11 15:05:39 +00:00
|
|
|
|
2020-05-11 15:07:27 +00:00
|
|
|
registry-ui:
|
2020-05-11 16:52:20 +00:00
|
|
|
image: "joxit/docker-registry-ui:latest"
|
2020-05-11 15:07:27 +00:00
|
|
|
ports:
|
2020-05-11 15:11:16 +00:00
|
|
|
- "3060:80"
|
2020-05-11 15:05:39 +00:00
|
|
|
networks:
|
|
|
|
- proxy
|
2020-05-11 15:25:43 +00:00
|
|
|
depends_on:
|
|
|
|
- registry
|
2020-05-11 15:05:39 +00:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.role == manager
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2020-05-11 16:34:43 +00:00
|
|
|
- "traefik.http.services.registry-ui.loadbalancer.server.port=80"
|
|
|
|
- "traefik.http.routers.registry-ui.rule=Host(`catalogue.swarm.autonomic.zone`)"
|
|
|
|
- "traefik.http.routers.registry-ui.entrypoints=web-secure"
|
|
|
|
- "traefik.http.routers.registry-ui.tls.certresolver=production"
|
2020-05-11 15:05:39 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|
|
|
|
|
2020-05-11 16:34:43 +00:00
|
|
|
configs:
|
|
|
|
config-yml-prod-v1:
|
|
|
|
file: config.yml
|
|
|
|
|
2020-05-11 15:05:39 +00:00
|
|
|
volumes:
|
|
|
|
registry:
|