Submatter/scripts/build-coolify.sh
Randall Stillwell b513b3b04f fix(docker): serialize Coolify builds and harden web/worker image inputs
Avoid Coolify OOM crashes by documenting and scripting sequential service builds, and make Docker builds resilient to local-only .env symlinks and missing .cursor agent paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 01:00:21 -05:00

26 lines
822 B
Bash
Executable file

#!/usr/bin/env bash
# Coolify custom build command for docker-compose.coolify.yml.
#
# Set in Coolify → Resource → Advanced → Custom Build Command:
# bash scripts/build-coolify.sh
#
# Coolify auto-injects -f and --env-file; this script only serializes builds so
# an 8 GB host does not OOM (exit 255) while exporting five runtime images.
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$repo_root"
export DOCKER_BUILDKIT=1
compose() {
docker compose --project-directory "$repo_root" \
-f docker/docker-compose.coolify.yml \
"$@"
}
# Build one service at a time so an 8 GB host does not OOM during export
# (Coolify default runs all five targets in parallel → exit 255).
for service in collab mcp orchestrator worker web; do
compose build --pull "$service"
done