File tree 2 files changed +41
-1
lines changed
2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright © 2023 OpenIM. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ mongo -- " $MONGO_INITDB_DATABASE " << EOF
16
+ db = db.getSiblingDB('admin')
17
+ db.auth('$MONGO_INITDB_ROOT_USERNAME ', '$MONGO_INITDB_ROOT_PASSWORD ')
18
+ db = db.getSiblingDB('$MONGO_INITDB_DATABASE ')
19
+ db.createUser({
20
+ user: "$MONGO_USERNAME ",
21
+ pwd: "$MONGO_PASSWORD ",
22
+ roles: [
23
+ { role: 'root', db: '$MONGO_INITDB_DATABASE ' }
24
+ ]
25
+ })
26
+ EOF
Original file line number Diff line number Diff line change
1
+ # Copyright © 2023 OpenIM. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
# ======================================
2
16
# ========= Basic Configuration ========
3
17
# ======================================
@@ -262,4 +276,4 @@ SERVER_BRANCH=${SERVER_BRANCH}
262
276
263
277
# Port for the OpenIM admin API.
264
278
# Default: OPENIM_ADMIN_API_PORT=10009
265
- OPENIM_ADMIN_API_PORT=${OPENIM_ADMIN_API_PORT}
279
+ OPENIM_ADMIN_API_PORT=${OPENIM_ADMIN_API_PORT}
You can’t perform that action at this time.
0 commit comments