mirror of
https://github.com/F1bonacc1/process-compose.git
synced 2024-09-11 19:37:08 +03:00
140 lines
3.2 KiB
YAML
140 lines
3.2 KiB
YAML
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
|
|
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"
|