fix(blockchain-service): auto-create database and run migrations on startup
- Add rwa_blockchain to init-databases.sh script - Change Dockerfile CMD to run prisma db push before starting app 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e20e3cb7af
commit
1125dd98ef
|
|
@ -50,5 +50,5 @@ EXPOSE 3012
|
|||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:3012/api/v1/health || exit 1
|
||||
|
||||
# Start application
|
||||
CMD ["node", "dist/main.js"]
|
||||
# Start application with database migration
|
||||
CMD ["sh", "-c", "npx prisma db push --skip-generate && node dist/main.js"]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ EOSQL
|
|||
}
|
||||
|
||||
# Create all required databases
|
||||
for db in rwa_identity rwa_wallet rwa_mpc rwa_backup rwa_planting rwa_referral rwa_reward rwa_leaderboard rwa_reporting rwa_authorization rwa_admin rwa_presence; do
|
||||
for db in rwa_identity rwa_wallet rwa_mpc rwa_backup rwa_planting rwa_referral rwa_reward rwa_leaderboard rwa_reporting rwa_authorization rwa_admin rwa_presence rwa_blockchain; do
|
||||
create_database "$db"
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue