Open samuelhsu123 opened 4 years ago
in order to run:
in mongo container: (docker exec --user root -ti mongo /bin/bash --login)
>rs.initiate()
in rocketchat container: (docker exec --user root -ti rocketchat /bin/bash --login)
To fix docker network issues (i.e. you have just renumbered the networks):
docker container ls -a
shows all docker containers
docker rm <relevant container>
do this on all containers (an alternative approach is the nuclear: docker container prune
)
docker network prune
removes old networks so they are properly recreated
To connect to LDAP:
Enable
to true using the radio buttonHost: 172.25.1.8
or other ip if using different settingPort: 389
Base DN: cn=admin,dc=ldap,dc=cloyne,dc=org
Enable: True
User DN: cn=admin,dc=ldap,dc=cloyne,dc=org
Password:
to the correct password
cloynemongodb
This was on Christopher's computer.
Forked version of mongodb container (version 3.6) with the recommended settings from the rocket-chat container (step one):
oplog size: 128 replset: rs0
There is a third option "smallfiles" but we haven't done anything with that yet.
First, localhost and localhost:3000 give "conection was reset" at the moment, which is different from "connection refused" previously with clonmmongodb.
Following step two, we got some kind of syntax error claiming a missing curly bracket, but there's doesn't seem to be a missing one. New error after adding escape characters around the quotation marks. Something might have been misnamed.
Added to mongo 3.6 dockerfile
echo -e "replication:\n replSetName: \ "rs01\"" | sudo tee -a /etc/mongod.conf
In /etc/service/rocketchat/run added to the last line (so the same line):
--replSet rs01
before2>&1
.Ran
rs.initiate()
in the mongo shell. Oddly enough replicaset first showed up as secondary, but then showed up as primary upon runningrs.isMaster()
.Ran
export MONGO_UPLOG_URL: mongodb://mongo:27017/local?replSet=rs01 MONGO_URL: mongodb://mongo:27017/rocketchat node main.js
in the mongo shell.After this, rocketchat worked on localhost:3000.