Skip to content

Commit a18730e

Browse files
committed
updates entrypoint.sh logic for migration
1 parent 537349b commit a18730e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

entrypoint.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# Start the main Rust binary with runtime args/envs
4+
# If an explicit tool is passed (migration/seed_db), run it directly
5+
if [[ $# -gt 0 ]]; then
6+
case "$1" in
7+
migration|seed_db)
8+
exec /app/"$@"
9+
;;
10+
esac
11+
fi
12+
13+
# If no args passed (default case for migrator service), run SeaORM migration up
14+
if [[ "$(basename "$0")" == "entrypoint.sh" ]]; then
15+
echo "🔧 Running SeaORM migration up (initial setup if needed)..."
16+
exec /app/migration up
17+
fi
18+
19+
# Otherwise, start the main backend app
520
exec /app/refactor_platform_rs \
621
-l "$BACKEND_LOG_FILTER_LEVEL" \
722
-i "$BACKEND_INTERFACE" \

0 commit comments

Comments
 (0)