-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 1.23 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '3.1'
services:
registry:
restart: always
image: registry:2
volumes:
- registry:/var/lib/registry
environment:
- REGISTRY_HTTP_ADDR=0.0.0.0:5000
# - REGISTRY_HTTP_HOST=https://registry.forma-dev.com
networks:
- traefik_net
- default
deploy:
mode: 'global'
placement:
constraints:
- 'node.hostname == docker-registry'
labels:
- "traefik.port=5000"
- "traefik.docker.network=formapro_registry_traefik_net"
- "traefik.frontend.entryPoints=http,https"
- "traefik.frontend.redirect.entryPoint=https"
- "traefik.frontend.rule=Host:registry.forma-dev.com"
traefik:
image: traefik
ports:
- 80:80
- 443:443
- 8080:8080
command: traefik --docker --docker.swarmMode --docker.domain=traefik --docker.watch --api --logLevel="DEBUG" --debug --acme.acmelogging
networks:
- traefik_net
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /registry/traefik.toml:/etc/traefik/traefik.toml
deploy:
mode: 'global'
placement:
constraints:
- 'node.hostname == docker-registry'
volumes:
registry: ~
networks:
traefik_net:
driver: overlay