-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
54 lines (54 loc) · 1.93 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
54 lines (54 loc) · 1.93 KB
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
---
services:
web:
image: nginx:latest
profiles: [web]
deploy:
replicas: 2
update_config:
parallelism: 4
delay: 0s
failure_action: pause
monitor: 5s
max_failure_ratio: 0.1
order: start-first
x-healthcheck-host-command: |
echo "Healthcheck for container {{ .ContainerShortID }} failed!" >&2
exit 0
x-pre-stop-command: |
echo "This can be used to interact with the container before it is stopped by the docker api"
echo "It can also be used to update other systems that are tracking containers within the docker compose project"
echo 'Pre-stop command running inside container'
exit 0
x-pre-stop-host-command: |
echo "This can be used to interact with the container before it is stopped by the docker api"
echo 'Stop command running on host'
exit 0
x-post-stop-host-command: |
echo "This can be used to interact with the container after it is stopped by the docker api"
echo "It can also be used to update other systems that are tracking containers within the docker compose project"
echo 'Post-stop command running on host'
exit 0
x-post-start-command: |
echo "This can be used to interact with the container after it is started by the docker api"
echo "It can also be used to update other systems that are tracking containers within the docker compose project"
echo 'Post-start command running on host'
exit 0
depends_on:
db:
condition: service_started
redis:
condition: service_started
redis:
image: redis
depends_on:
nginx-first:
condition: service_started
nginx-first:
image: nginx:latest
db:
image: postgres:18
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres