process-compose/process-compose.override.yaml
2023-07-21 00:19:54 +03:00

136 lines
3.0 KiB
YAML

version: "0.5"
log_level: debug
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.{PC_LOG}.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 $PROC4"
availability:
restart: "always"
backoff_seconds: 2
depends_on:
nginx:
condition: process_healthy
process4:
command: "./test_loop.bash process4-override"
namespace: test
replicas: 2
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
pc_log:
command: "tail -f -n100 process-compose-${USER}.log"
working_dir: "/tmp"
environment:
- 'REDACTED=1'
- 'ADDED=2'
depends_on:
process0:
condition: process_completed
bat_config:
command: "batcat -f process-compose.yaml"