-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add database initialization script and update Docker configuration
- Loading branch information
1 parent
d2fc4cc
commit bbeec76
Showing
3 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This is a script to initialize the database for the first time when the container is started. | ||
# It will wait for the database to be ready before running the migrations. | ||
# Wait for the | ||
|
||
echo "Database is ready. Running migrations..." | ||
|
||
# Run the migrations | ||
npm run sync:db | ||
npm run migration:generate | ||
npm run seed | ||
|
||
echo "Migrations complete. Database is ready." | ||
|
||
# Start the application | ||
|
||
npm run dev |