-
Notifications
You must be signed in to change notification settings - Fork 202
/
docker-compose.yml
85 lines (74 loc) · 2.27 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: "3"
services:
cert_gen:
container_name: "cert-gen"
image: paulczar/omgwtfssl
volumes:
- certs:/certs
labels:
- "traefik.enable=false"
traefik:
build: traefik/
container_name: "traefik"
networks:
- default
- inside
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- certs:/certs
- logs:/logs
labels:
- "traefik.frontend.rule=PathPrefixStrip:/api"
- "traefik.frontend.auth.basic.usersFile=/etc/traefik/.htpasswd"
- "traefik.port=8081"
templates:
build : templates/
container_name: "templates"
networks:
- inside
labels:
- "traefik.enable=false"
public-files:
image: aikain/simplehttpserver:0.1
container_name: "public-files"
volumes:
- files:/var/www/
- logs:/var/www/logs
networks:
- inside
labels:
- "traefik.sec.frontend.rule=PathPrefixStrip:/files/logs"
- "traefik.sec.port=80"
- "traefik.sec.frontend.auth.basic.users=admin:$$apr1$$JWufnu2u$$jK16K8EczmfIBDk5p3xw6/"
- "traefik.nosec.frontend.rule=PathPrefixStrip:/files"
- "traefik.nosec.port=80"
portainer:
image: portainer/portainer
container_name: "portainer-app"
networks:
- inside
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/portainer/data:/data
command: --host=unix:///var/run/docker.sock --logo "https://i.imgur.com/kfi99Po.png" --templates "http://templates/templates.yml"
labels:
- "traefik.frontend.rule=PathPrefixStrip:/portainer"
- "traefik.port=9000"
- "traefik.passHostHeader=true"
- "traefik.docker.network=redcloud_inside"
- "traefik.backend.loadbalancer.swarm=true"
- "traefik.backend.loadbalancer.method=drr"
# https://github.com/containous/traefik/issues/563#issuecomment-421360934
- "traefik.frontend.redirect.regex=^(.*)/portainer$$"
- "traefik.frontend.redirect.replacement=$$1/portainer/"
- "traefik.frontend.rule=PathPrefix:/portainer;ReplacePathRegex: ^/portainer/(.*) /$$1"
volumes:
certs:
logs:
files:
networks:
inside:
external: false