forked from extern/docker
separate mongodb
This commit is contained in:
parent
c66e89fa14
commit
94cfe45014
@ -22,7 +22,6 @@ services:
|
||||
- ./mod/html5/config.yml:/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
|
||||
- ./mod/web/override.conf:/etc/systemd/system/bbb-web.service.d/override.conf
|
||||
- ./mod/web/bigbluebutton.properties:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
|
||||
- ./mod/bbb-webrtc-sfu/config.yml:/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml
|
||||
network_mode: host
|
||||
|
||||
nginx:
|
||||
@ -62,6 +61,12 @@ services:
|
||||
bluenet:
|
||||
ipv4_address: 10.7.7.5
|
||||
|
||||
mongodb:
|
||||
image: mongo:3.4
|
||||
networks:
|
||||
bluenet:
|
||||
ipv4_address: 10.7.7.6
|
||||
|
||||
kurento:
|
||||
image: kurento/kurento-media-server:6.13
|
||||
environment:
|
||||
|
@ -25,34 +25,8 @@ fi
|
||||
# change to start meteor in production (https) or development (http) mode
|
||||
ENVIRONMENT_TYPE=production
|
||||
|
||||
echo "Starting mongoDB"
|
||||
|
||||
#wait for mongo startup
|
||||
MONGO_OK=0
|
||||
|
||||
while [ "$MONGO_OK" = "0" ]; do
|
||||
MONGO_OK=`netstat -lan | grep 127.0.1.1 | grep 27017 &> /dev/null && echo 1 || echo 0`
|
||||
sleep 1;
|
||||
done;
|
||||
|
||||
echo "Mongo started";
|
||||
|
||||
echo "Initializing replicaset"
|
||||
mongo 127.0.1.1 --eval 'rs.initiate({ _id: "rs0", members: [ {_id: 0, host: "127.0.1.1"} ]})'
|
||||
|
||||
|
||||
echo "Waiting to become a master"
|
||||
IS_MASTER="XX"
|
||||
while [ "$IS_MASTER" \!= "true" ]; do
|
||||
IS_MASTER=`mongo mongodb://127.0.1.1:27017/ --eval 'db.isMaster().ismaster' | tail -n 1`
|
||||
sleep 0.5;
|
||||
done;
|
||||
|
||||
echo "I'm the master!"
|
||||
|
||||
cd /usr/share/meteor/bundle
|
||||
export ROOT_URL=http://127.0.0.1/html5client
|
||||
export MONGO_OPLOG_URL=mongodb://127.0.1.1/local
|
||||
export MONGO_URL=mongodb://127.0.1.1/meteor
|
||||
export MONGO_URL=mongodb://10.7.7.6/meteor
|
||||
export NODE_ENV=production
|
||||
PORT=3000 /usr/bin/node main.js
|
||||
|
Loading…
Reference in New Issue
Block a user