Skip to content

Commit ad38a42

Browse files
nanotaboadaCopilot
andcommitted
fix(docker): run seed scripts on startup to guard against stale volumes
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8c8d903 commit ad38a42

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ COPY models/ ./models/
5757
COPY routes/ ./routes/
5858
COPY schemas/ ./schemas/
5959
COPY services/ ./services/
60+
COPY tools/ ./tools/
6061

6162
# Copy entrypoint and healthcheck scripts
6263
COPY --chmod=755 scripts/entrypoint.sh ./entrypoint.sh

scripts/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ else
2020
echo "✔ Existing database file found. Skipping seed copy."
2121
fi
2222

23+
echo "🔄 Running seed scripts to ensure schema is up to date..."
24+
python /app/tools/seed_001_starting_eleven.py --db-path "$VOLUME_STORAGE_PATH"
25+
python /app/tools/seed_002_substitutes.py --db-path "$VOLUME_STORAGE_PATH"
26+
2327
echo "✔ Ready!"
2428
echo "🚀 Launching app..."
2529
exec "$@"

0 commit comments

Comments
 (0)