mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00

From version 3.6+ mongodb by default binds only to localhost (127.0.0.1) IP. That can be checked with "netstat -tulpn | grep LISTEN" command in container. It will return "127.0.0.1:27017 | 0.0.0.0:* | LISTEN | 15/mongod" for mongod. That causes inability to connect to running mongo from host machine. Proposed change allows mongo to bind to container network interface, thus allowing connections from host machine.
19 lines
477 B
Bash
Executable File
19 lines
477 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright BigchainDB GmbH and BigchainDB contributors
|
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
|
|
|
|
|
# MongoDB configuration
|
|
[ "$(stat -c %U /data/db)" = mongodb ] || chown -R mongodb /data/db
|
|
|
|
# BigchainDB configuration
|
|
bigchaindb-monit-config
|
|
|
|
nohup mongod --bind_ip_all > "$HOME/.bigchaindb-monit/logs/mongodb_log_$(date +%Y%m%d_%H%M%S)" 2>&1 &
|
|
|
|
# Tendermint configuration
|
|
tendermint init
|
|
|
|
monit -d 5 -I -B
|