-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (55 loc) · 1.68 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
version: '3.7'
networks:
local-shared-net:
name: local-shared-net
driver: bridge
services:
traefik:
container_name: traefik
image: traefik:v2.0.4
command:
- "--docker"
- "--docker.endpoint=unix:///var/run/docker.sock"
- "--api"
ports:
- "80:80" # The HTTP port
- "8080:8080" # The Web UI (enabled by --api)
- "443:443"
- "4000:4000" # nodejs server
- "62000:62000" # administrative purpose
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
- ./traefik.toml:/etc/traefik/traefik.toml
- ./cert.crt:/etc/traefik/traefik.crt
- ./cert.key:/etc/traefik/traefik.key
networks:
- local-shared-net
labels:
- "traefik.enable=false"
restart: always
# A container that exposes a simple API
whoami:
image: emilevauge/whoami # A container that exposes an API to show it's IP address
hostname: whoami.localhost
container_name: whoami
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.whoami.rule=Host(`whoami.localhost`)
- traefik.docker.network=local-shared-net
networks:
- local-shared-net
portainer:
image: portainer/portainer # A container that exposes an API to show it's IP address
hostname: portainer.localhost
container_name: portainer
restart: always
labels:
- traefik.enable=true
- traefik.port=9000
- traefik.http.routers.portainer.rule=Host(`portainer.localhost`)
networks:
- local-shared-net
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.docker-development-environment/portainer:/data