forked from bekkerstacks/traefik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose_http.yml
50 lines (47 loc) · 1.11 KB
/
docker-compose_http.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.5'
services:
traefik:
image: traefik:1.7.14
ports:
- 80:80
configs:
- source: traefik_htpasswd
target: /etc/htpasswd
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
preferences:
- spread: node.id
labels:
- traefik.frontend.rule=Host:traefik.${DOMAIN:-localhost}
- traefik.enable=true
- traefik.port=8080
- traefik.tags=public
- traefik.docker.network=public
- traefik.frontend.auth.basic.usersFile=/etc/htpasswd
- traefik.redirectorservice.frontend.entryPoints=http
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: >
--docker
--docker.swarmmode
--docker.watch
--docker.exposedbydefault=false
--constraints=tag==public
--entrypoints='Name:http Address::80'
--logLevel=INFO
--accessLog
--api
--metrics
--metrics.prometheus
networks:
- public
configs:
traefik_htpasswd:
file: ./htpasswd
networks:
public:
name: public
driver: overlay