update project
This commit is contained in:
15
apps/api/docker-entrypoint.sh
Normal file
15
apps/api/docker-entrypoint.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# If Vault init-keys exist, extract root token
|
||||
if [ -f /vault/file/init-keys.json ]; then
|
||||
export VAULT_TOKEN=$(tr -d ' \n' < /vault/file/init-keys.json | grep -o '"root_token":"[^"]*"' | cut -d'"' -f4)
|
||||
echo "[API] Vault token loaded from init-keys.json"
|
||||
fi
|
||||
|
||||
# Run migrations
|
||||
node node_modules/knex/bin/cli.js migrate:latest --knexfile dist/db/knexfile.js
|
||||
echo "[API] Migrations complete"
|
||||
|
||||
# Start server
|
||||
exec node dist/index.js
|
||||
Reference in New Issue
Block a user