-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yaml
55 lines (53 loc) · 2.2 KB
/
docker-compose.yaml
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"
services:
lazytainer:
container_name: lazytainer
# to build the image yourself:
# 1. comment 'image:...'
# 2. uncomment 'build: .'
# 3. instead of 'docker compose up', run 'DOCKER_BUILDKIT=1 docker-compose up --build'
image: ghcr.io/vmorganp/lazytainer:master
# build: .
environment:
- VERBOSE=true # probably set this to false unless you're debugging or doing the initial demo
- IPV4_DISABLED=false
- IPV6_DISABLED=false
ports:
- 81:81
- 82:82
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
# this configuration will cause traffic to whoami1 to start whoami2, but traffic to only whoami2 will not wake whoami1
# if there's no incoming traffic on port 81, pause whoami1
- "lazytainer.group.group1.pollRate=1"
- "lazytainer.group.group1.inactiveTimeout=10"
- "lazytainer.group.group1.ports=81"
- "lazytainer.group.group1.sleepMethod=pause" # can be either "stop" or "pause", or left blank for stop
# if there's no incoming traffic on port 81 OR 82, pause whoami2
- "lazytainer.group.group2.pollRate=1"
- "lazytainer.group.group2.inactiveTimeout=10"
- "lazytainer.group.group2.ports=81,82"
- "lazytainer.group.group2.sleepMethod=stop" # can be either "stop" or "pause", or left blank for stop
whoami1:
container_name: whoami1
image: containous/whoami
# ports:
# - "81:81" # port should not be configured on this container since traffic is routed through lazytainer
command: --port 81 # This is specific to containous/whoami
network_mode: service:lazytainer # or `container:lazytainer` if lazytainer is not in this compose file
depends_on:
- lazytainer
labels:
- "lazytainer.group=group1"
whoami2:
container_name: whoami2
image: containous/whoami
# ports:
# - "82:82" # port should not be configured on this container since traffic is routed through lazytainer
command: --port 82 # This is specific to containous/whoami
network_mode: service:lazytainer # or `container:lazytainer` if lazytainer is not in this compose file
depends_on:
- lazytainer
labels:
- "lazytainer.group=group2"