fix: review compose dev for clean startup
This commit is contained in:
23
mongo-init.js
Normal file
23
mongo-init.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// MongoDB initialization script
|
||||
db = db.getSiblingDB('stripstream');
|
||||
|
||||
// Create a user for the stripstream database
|
||||
db.createUser({
|
||||
user: 'admin',
|
||||
pwd: 'password123',
|
||||
roles: [
|
||||
{
|
||||
role: 'readWrite',
|
||||
db: 'stripstream'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Create initial collections
|
||||
db.createCollection('users');
|
||||
db.createCollection('configs');
|
||||
db.createCollection('preferences');
|
||||
db.createCollection('favorites');
|
||||
db.createCollection('bookProgress');
|
||||
|
||||
print('MongoDB initialization completed successfully');
|
||||
Reference in New Issue
Block a user