deploy
This commit is contained in:
18
scripts/init-mongo.js
Normal file
18
scripts/init-mongo.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// MongoDB initialization script
|
||||
// This script runs when the container starts for the first time
|
||||
|
||||
db = db.getSiblingDB('beanstalk');
|
||||
|
||||
// Create application user
|
||||
db.createUser({
|
||||
user: 'app_user',
|
||||
pwd: 'app_password',
|
||||
roles: [
|
||||
{
|
||||
role: 'readWrite',
|
||||
db: 'beanstalk'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
print('Database initialization completed');
|
||||
Reference in New Issue
Block a user