acquire-core-x/app/entrypoint.sh
forge-bot 05a0ff3e56 Phase 2a: 모듈서버 패턴 + 재사용 빌드시스템 (ac 모듈 38서비스 실동작)
- ac_svr(30 매입서비스 advertise) + rc_svr/st_svr, dbio 정적라이브러리, common 라이브러리
- app/build.sh: 모듈 자동발견(app/src/<mod>/<mod>_svr.pgc) → ecpg+buildserver+ndrxconfig 생성
- ac 배치 2종, 스키마 9테이블, 검증: 41서비스 AVAIL, 체인·배치 psql 커밋, prepared_xacts=0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 09:37:17 +00:00

48 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
##
## Build (via the reusable build.sh) + boot the Enduro/X acquiring stack, then
## stay alive. Runs inside the app container (image acquire-x/endurox:7.0.12).
##
set -e
. /app/conf/setapp.sh
echo "=================================================================="
echo " acquire-core-x : build + boot (module-server pattern)"
echo "=================================================================="
# runtime dirs
mkdir -p /app/log /app/tmp /app/tmlogs/rm1 /app/bin /app/lib /app/obj
rm -f /app/log/*.log 2>/dev/null || true
# ensure posix mqueue is available (compose provides the sysctls/ulimits)
if [ ! -d /dev/mqueue ]; then
mkdir -p /dev/mqueue
mount -t mqueue none /dev/mqueue 2>/dev/null || true
fi
# ---------------------------------------------------------------------------
# Build everything + generate ndrxconfig.xml (discovers all modules)
# ---------------------------------------------------------------------------
bash /app/build.sh
ls -l /app/bin
# ---------------------------------------------------------------------------
# Boot Enduro/X
# ---------------------------------------------------------------------------
echo "--- xadmin down/start ---"
xadmin down -y 2>/dev/null || true
xadmin start -y
echo "--- xadmin psc (advertised services) ---"
xadmin psc
echo "--- xadmin ppm (processes) ---"
xadmin ppm
echo "=================================================================="
echo " acquire-core-x : UP. Run the 매입 chain driver with:"
echo " docker compose -f docker/docker-compose.yml exec app /app/run-driver.sh"
echo "=================================================================="
# keep the container (and the ndrxd daemon) alive
tail -F /app/log/ndrxd.log