If you have a dev environment on VSC and you want to move to production by creating docker images
mongorestore -d rocketchat dump/meteor // db name if rocketchat by default for offical images
//make sure to check db names while importing use a tool like robot3 to have mongo gui
please read ahead
create docker out of your meteor installation.
meteor build --server-only --directory /tmp/rc-build cp .docker/Dockerfile /tmp/rc-build cd /tmp/rc-build docker build -t someimage .
check your local meteor mongo port and take a dump.
mongodump -h 127.0.0.1 --port 3001 -d meteor --forceTableScan
create docker out of your meteor installation.
meteor build --server-only --directory /tmp/rc-build cp .docker/Dockerfile /tmp/rc-build cd /tmp/rc-build docker build -t someimage .
check your local meteor mongo port and take a dump.
mongodump -h 127.0.0.1 --port 3001 -d meteor --forceTableScan
// dbname is meteor for dev by default use the local mongodumb cli in ubuntu if not install mongo-tools.
//you will have to move this folder as a gzip file to the mongo container and do a restore.
tar -zcvf meteor.tar.gz meteor/
docker cp meteor.tar.gz mongo:/ ----------- mongo is container name and will place gz file in the root.
mongorestore -d rocketchat dump/meteor // db name if rocketchat by default for offical images
//make sure to check db names while importing use a tool like robot3 to have mongo gui
to run the new images run below.
$ docker run --name mongo -d mongo:4.0 --smallfiles --replSet rs0 --oplogSize 128
$ docker exec -ti mongo mongo --eval "printjson(rs.initiate())"
// default rocket.chat images look for mongo container to connect to on 27017 and with name mongo.
docker run --name rocketchat -p 80:3000 --link mongo --env ROOT_URL=http://localhost --env MONGO_OPLOG_URL=mongodb://mongo:27017/local -d someimage
//docker file for rocket.chat
https://github.com/RocketChat/Rocket.Chat/blob/develop/.docker/Dockerfile
No comments:
Post a Comment