76 lines
No EOL
1.8 KiB
YAML
76 lines
No EOL
1.8 KiB
YAML
services:
|
|
db-healthcheck:
|
|
image: stephenc/postgresql-cli:latest
|
|
command:
|
|
- "sh"
|
|
- "-c"
|
|
- >-
|
|
apk --no-cache add curl;
|
|
sleep 30;
|
|
while true; do
|
|
pg_output=$$(pg_isready -d ${DJANGO_DATABASE_URL} 2>&1);
|
|
exit_code=$$?;
|
|
if [ $$exit_code -eq 0 ]; then
|
|
success="true";
|
|
error="";
|
|
else
|
|
success="false";
|
|
error="$$pg_output";
|
|
fi;
|
|
curl -s -f -X POST \
|
|
--connect-timeout 10 \
|
|
--max-time 15 \
|
|
--header "Authorization: Bearer ${GATUS_TOKEN}" \
|
|
http://health:8080/api/v1/endpoints/db_pg-isready/external?success=$$success&error=$$error;
|
|
if [ "$$success" = "true" ]; then
|
|
echo " Database is OK";
|
|
sleep 60;
|
|
else
|
|
echo "Database is not OK: $$pg_output";
|
|
exit 1;
|
|
fi;
|
|
done
|
|
env_file:
|
|
- .env
|
|
loba:
|
|
image: haproxy:3.1
|
|
stop_signal: SIGTERM
|
|
restart: always
|
|
ports:
|
|
- 443:443
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
|
- ./certs:/certs
|
|
feedback:
|
|
restart: always
|
|
image: getfider/fider:stable
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./certs:/certs
|
|
cadvisor:
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:ro
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
- /dev/disk/:/dev/disk:ro
|
|
privileged: true
|
|
devices:
|
|
- /dev/kmsg
|
|
image: gcr.io/cadvisor/cadvisor:v0.52.1
|
|
health:
|
|
image: twinproduction/gatus:latest
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- GATUS_DELAY_START_SECONDS=30
|
|
volumes:
|
|
- ./gatus/config.yaml:/config/config.yaml
|
|
- ./certs:/certs
|
|
# secrets:
|
|
# env_file_base64:
|
|
# environment: ENV_FILE_BASE64 |