forked from F1bonacc1/process-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess-compose.yaml
138 lines (126 loc) · 3.12 KB
/
process-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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: "0.5"
log_level: info
log_length: 3000
environment:
- 'ABC=222'
log_location: ./pc.log
shell:
shell_command: "zsh"
shell_argument: "-c"
processes:
process0:
command: "ls -lFa --color=always"
working_dir: "/"
process1:
command: "./test_loop.bash ${PROC4}"
availability:
restart: "on_failure"
backoff_seconds: 2
depends_on:
_process2:
condition: process_completed_successfully
process3:
condition: process_completed
# process4:
# condition: process_completed_successfully
environment:
- 'EXIT_CODE=0'
shutdown:
command: "sleep 2 && pkill -f process1"
signal: 15
timeout_seconds: 4
_process2:
command: "./test_loop.bash process2"
log_location: ./pc.proc2.log
availability:
restart: "on_failure"
# depends_on:
# process3:
# condition: process_completed_successfully
environment:
- 'ABC=2221'
- 'PRINT_ERR=111'
- 'EXIT_CODE=2'
shutdown:
command: "sleep 2 && pkill -f 'test_loop.bash process2'"
signal: 15
timeout_seconds: 4
readiness_probe:
http_get:
host: "google.com"
scheme: "https"
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 2
success_threshold: 1
failure_threshold: 3
process3:
command: "./test_loop.bash process3"
availability:
restart: "always"
backoff_seconds: 2
depends_on:
nginx:
condition: process_healthy
process4:
command: "./test_loop.bash process4"
disable_ansi_colors: true
# availability:
# restart: on_failure
environment:
- 'ABC=2221'
- 'EXIT_CODE=4'
readiness_probe:
exec:
command: "ps -ef | grep -v grep | grep process4"
initial_delay_seconds: 5
period_seconds: 2
timeout_seconds: 1
success_threshold: 1
failure_threshold: 3
# nginx:
# command: "docker run -d --rm -p80:80 --name nginx_test nginx"
# # availability:
# # restart: on_failure
# is_daemon: true
# shutdown:
# command: "docker stop nginx_test"
# signal: 15
# timeout_seconds: 5
# liveness_probe:
# exec:
# command: "[ $(docker inspect -f '{{.State.Running}}' nginx_test) = 'true' ]"
# initial_delay_seconds: 5
# period_seconds: 2
# timeout_seconds: 5
# success_threshold: 1
# failure_threshold: 3
# readiness_probe:
# http_get:
# host: 127.0.0.1
# path: "/"
# port: 80
# initial_delay_seconds: 5
# period_seconds: 10
# timeout_seconds: 5
# success_threshold: 1
# failure_threshold: 3
# availability:
# restart: "always"
# backoff_seconds: 2
kcalc:
command: "kcalc"
disabled: true
__pc_log:
command: "tail -f -n100 process-compose-${USER}.log"
working_dir: "/tmp"
environment:
- 'REDACTED=1'
depends_on:
process0:
condition: process_completed
__pc_log_client:
command: "tail -f -n100 process-compose-${USER}-client.log"
working_dir: "/tmp"
bat_config:
command: "batcat -f process-compose.yaml"