This commit is contained in:
MaKarin
2026-04-06 12:50:46 +03:00
commit 73ddb1a948
155 changed files with 26688 additions and 0 deletions

16
db-seed/import.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -eu
export PGPASSWORD="${POSTGRES_PASSWORD:-postgres}"
until pg_isready -h "${POSTGRES_HOST:-postgres}" -U "${POSTGRES_USER:-postgres}" -d "${POSTGRES_DB:-toir}"; do
sleep 2
done
if [ -f /seed/equipment-import.sql ]; then
psql \
-h "${POSTGRES_HOST:-postgres}" \
-U "${POSTGRES_USER:-postgres}" \
-d "${POSTGRES_DB:-toir}" \
-f /seed/equipment-import.sql
fi