-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
process-compose.yaml
127 lines (114 loc) · 2.76 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
version: "0.5"
log_level: info
log_length: 3000
log_configuration:
rotation:
max_size_mb: 1
max_age_days: 3
max_backups: 3
compress: true
fields_order: ["time", "level", "message"]
disable_json: true
timestamp_format: "06-01-02 15:04:05.000"
no_metadata: false
add_timestamp: true
environment:
- 'ABC=222'
log_location: ./pc.log
shell:
shell_command: "bash"
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
server:
command: "python3 -m http.server 404{{.PC_REPLICA_NUM}}"
is_tty: true
readiness_probe:
http_get:
host: "127.0.0.1"
port: "404{{.PC_REPLICA_NUM}}"
scheme: "http"
kcalc:
command: "kcalc"
disabled: true
__pc_log:
command: "tail -f -n100 process-compose-${USER}.log"
working_dir: "/tmp"
environment:
- 'REDACTED=1'
namespace: debug
__pc_log_client:
command: "tail -f -n100 process-compose-${USER}-client.log"
working_dir: "/tmp"
namespace: debug
bat_config:
command: "batcat -f process-compose.yaml"