mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-27 05:52:29 +08:00
fix: improve mongo service deploy in docker.
This commit is contained in:
parent
269dd7180f
commit
5dbd7b00af
@ -8,7 +8,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "37017:27017"
|
- "37017:27017"
|
||||||
container_name: mongo
|
container_name: mongo
|
||||||
command: ["/bin/bash", "-c", "/docker-entrypoint-initdb.d/mongo-init.sh; docker-entrypoint.sh mongod --wiredTigerCacheSizeGB 1 --auth"]
|
command: ["/bin/bash", "-c", "docker-entrypoint.sh mongod --wiredTigerCacheSizeGB 1 --auth & /docker-entrypoint-initdb.d/mongo-init.sh; wait"]
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mongodb/data/db:/data/db"
|
- "${DATA_DIR}/components/mongodb/data/db:/data/db"
|
||||||
- "${DATA_DIR}/components/mongodb/data/logs:/data/logs"
|
- "${DATA_DIR}/components/mongodb/data/logs:/data/logs"
|
||||||
|
|||||||
@ -11,6 +11,8 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
echo "before running mongosh..."
|
||||||
|
|
||||||
mongosh <<EOF
|
mongosh <<EOF
|
||||||
var maxRetries = 300;
|
var maxRetries = 300;
|
||||||
var connected = false;
|
var connected = false;
|
||||||
@ -61,6 +63,4 @@ if (connected) {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
echo "mongosh completed..."
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user