READ-ONLY PACKAGE PREVIEW

docker-compose-patterns/scripts/verify-compose.sh

Version 3e1cbd179989 · Apache-2.0. This preview displays packaged text and does not execute code. Treat the contents as untrusted instructions.

← Return to resource and package checksum

#!/usr/bin/env bash
# Verify Compose configuration. Run from the project root.
# Usage: bash "<skill-dir>/scripts/verify-compose.sh" [--help]
# <skill-dir> is the directory that contains this skill's SKILL.md.
set -euo pipefail

usage() {
    echo "Usage: bash \"<skill-dir>/scripts/verify-compose.sh\" [--help]"
    echo "Run from the project root; <skill-dir> is the directory that contains this skill's SKILL.md."
    echo "Validates compose.yaml with docker compose config --quiet (no rendered configuration)."
}

if [[ "${1:-}" == "--help" && $# == 1 ]]; then
    usage
    exit 0
fi

if (( $# != 0 )); then
    usage >&2
    exit 2
fi

docker compose config --quiet