-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
55 lines (52 loc) · 1.88 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
version: "3.9"
services:
traefik:
container_name: traefik
image: traefik:v2.5
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--providers.file.directory=/app/certificates"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certificates:/app/certificates
restart: unless-stopped
ports:
- 80:80
- 443:443
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.redirectssl.redirectscheme.scheme=https"
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik.middlewares=redirectssl@docker"
- "traefik.http.routers.traefiksecure.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefiksecure.tls=true"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
minica_api:
build: .
volumes:
- ./certificates:/app/certificates
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
USER_ID: 1000
GROUP_ID: 1000
DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_LISTEN: "yes"
labels:
- "traefik.enable=true"
- "traefik.http.routers.minica.rule=Host(`minica.localhost`)"
- "traefik.http.routers.minica.middlewares=redirectssl@docker"
- "traefik.http.routers.minicasecure.rule=Host(`minica.localhost`)"
- "traefik.http.routers.minicasecure.tls=true"
nginx:
image: nginx
labels:
- "traefik.enable=true"
- "traefik.http.routers.nginx.rule=Host(`nginx.localhost`)"
- "traefik.http.routers.nginx.middlewares=redirectssl@docker"
- "traefik.http.routers.nginxsecure.rule=Host(`nginx.localhost`)"
- "traefik.http.routers.nginxsecure.tls=true"