Files
electric-cherry/entrypoint.sh
T
josh 2a6009270d Move Dockerfile, entrypoint.sh, docker-compose.yml to repo root
Komodo's build ran `docker build -f Dockerfile .` from inside docker/,
which set the build context to docker/ — a directory that contains neither
package.json nor a nested docker/entrypoint.sh, so both COPY steps failed.
Moving these three files to the repo root makes `docker build .` from the
repo root work with default Komodo settings (no per-build-tool config).

- Dockerfile: update COPY entrypoint.sh path (drops docker/ prefix)
- docker-compose.yml: build.context = . (drops dockerfile: override)
- README.md: docker compose build (drops -f docker/docker-compose.yml)
2026-09-12 00:41:57 -04:00

15 lines
614 B
Bash

#!/bin/sh
set -eu
# Legacy import: if /data/cherry.db is empty and script_metadata.json exists
# in the mounted zombies tree, run a one-shot import before starting.
if [ -n "${LEGACY_METADATA:-}" ] && [ -f "$LEGACY_METADATA" ]; then
if [ ! -f "${DB_PATH:-/data/cherry.db}" ] || [ ! -s "${DB_PATH:-/data/cherry.db}" ]; then
echo "[entrypoint] running legacy import from $LEGACY_METADATA"
node build/scripts/import-legacy.js || echo "[entrypoint] legacy import failed — continuing"
fi
fi
echo "[entrypoint] starting node server on ${HOST:-0.0.0.0}:${PORT:-3000}"
exec node build/index.js