1,docker build -f jianyeruan/node . || dos2unix xxx.sh
docker login | docker exec -it nodejs bash |docker stop|rm $(docker ps -a -q)
2,docker目录usr/share/app 对应我的app目录
docker run -d --name data -v /home/jianyeruan/app:/usr/share/app busybox || windows c:\jayruanwork\app|config
docker run -d --volumes-from=data --name mongo -p 27019:27019 jianyeruan/mongo /run.sh mongod --port 27019 --dbpath /data
docker run --volumes-from=data --link mongo:mongo -e APPPATH="nodeapi" --rm jianyeruan/node /run.sh node modules/createsuper.js
docker run --volumes-from=data --link mongo:mongo -e APPPATH="nodeapi" --rm jianyeruan/node /run.sh apidoc -i routes/ -o public/apidoc/
docker run -it --volumes-from=data -p 3002:3002 --link mongo:mongo -e APPPATH="nodeapi" --rm jianyeruan/node /run.sh supervisor app.js
docker run -d --name=nginx -p 80:80 --volumes-from=data -v /home/jianyeruan/config/nginx:/etc/nginx/conf.d nginx
3,git
git fetch --all
git reset --hard origin/master
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/jianyeruan80/ioincapp.git origin master
git remote add origin https://[email protected]/jianyeruan/emenu.git origin/mast
git push -u origin master
touch .gitignore
cat > .gitignore
#Floder#
bin/
node_modules/
logs/M*
4:backup | restorage
docker exec mongo mongodump --port=27019 -d testdb -o /usr/share/jayruanwork/mongo -u admin -p=123456 --authenticationDatabase admin
mongoexport --port=27019 -d testdb -c test -o students.dat -u admin -p=mypass --authenticationDatabase admin
mongorestore --port=27019 -d testdb /usr/share/jayruanwork/mongo/testdb -u admin -p=mypass --authenticationDatabase admin
mongoimport --port=27019 -d testdb -c students students.dat -u admin -p=mypass --authenticationDatabase admin
mongodump --port=27019 -d testdb -o /usr/share/app/mongo -u admin -p=123456 --authenticationDatabase admin
mongorestore --port=27019 -d test5201 /usr/share/app/mongo/test520 -u admin -p=admin --authenticationDatabase admin
docker exec mongo mongodump --port=27019 -d rjy -o /usr/share/app/mongo -u rjy -p=rjy --authenticationDatabase admin
docker exec mongo mongorestore --port=27019 -d rjy /usr/share/app/mongo/rjy -u rjy -p=rjy --authenticationDatabase admin
mongodump --port=27019 -d testdb -o /usr/share/app/mongo -u admin -p=123456 --authenticationDatabase admin
mongorestore --port=27019 -d test5201 /usr/share/app/mongo/test520 -u admin -p=admin --authenticationDatabase admin