├── README.md ├── replicaset_monog_start.sh └── meteor_start.sh /README.md: -------------------------------------------------------------------------------- 1 | Put this one your server. 2 | 3 | ./meteor_start.sh 4 | 5 | If you're also self hosting MongoDB, you can configure that easy, and then run 6 | 7 | ./replicaset_monog_start.sh 8 | -------------------------------------------------------------------------------- /replicaset_monog_start.sh: -------------------------------------------------------------------------------- 1 | sudo mongo --port 27017 --eval 'db.adminCommand("shutdown")' 2 | 3 | #This looks weird because it's on a deifferent partition, formatted for Mongo Speed 4 | sudo mongod --port 27017 --replSet rs0 --logpath /dev/null --logappend --fork --dbpath /media/mongo_drive/sco/rs0_1 --rest --httpinterface --wiredTigerEngineConfigString="cache_size=12000M" 5 | -------------------------------------------------------------------------------- /meteor_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #========================== 3 | # 4 | # STAR COMMANDER ONLINE 5 | # 6 | #========================== 7 | 8 | # VERSION 5 9 | # 2017/06/11 10 | 11 | 12 | #MANUAL SETUP 13 | 14 | #METHOND 1 15 | #NODEJS 16 | #cd ~ 17 | #curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh 18 | #sudo bash nodesource_setup.sh 19 | #sudo apt-get install nodejs 20 | #sudo apt-get install build-essential 21 | 22 | #METHOD 2 23 | #sudo apt-get install nodejs 24 | #sudo apt-get install nodejs-legacy 25 | #sudo apt-get install npm 26 | 27 | #sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000 28 | #sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 29 | #sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 30 | 31 | #MONGODB 32 | #https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ 33 | 34 | 35 | #FOREVER 36 | #npm install forever 37 | #npm install forever-monitor 38 | #npm i forever -g 39 | 40 | forever stopall 41 | 42 | #FORWARD PORT 80 TO 3000 43 | sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000 44 | sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 45 | 46 | 47 | export METEOR_CORDOVA_COMPAT_VERSION_IOS="v40" 48 | export METEOR_CORDOVA_COMPAT_VERSION_ANDROID="v40" 49 | export METEOR_CORDOVA_COMPAT_VERSION_EXCLUDE=* 50 | export ROOT_URL='https://www.mywebsite.com' 51 | export MONGO_URL='mongodb://mongouser:mongopassword@localhost:27017/projectdb' 52 | export MONGO_OPLOG_URL='mongodb://oploguser:oplogpassword@localhost:27017/local?authSource=projectdb' 53 | export PORT='3000' 54 | export METEOR_SETTINGS=$(cat /home/meteoruser/settings.json ) 55 | export KADIRA_PROFILE_LOCALLY=1 56 | #export KADIRA_APP_ID=your_nodechef.com_app_id 57 | #export KADIRA_APP_SECRET=your_nodechef.com_secret 58 | 59 | cd /home/meteoruser/upload 60 | rm -rf bundle 61 | tar -xvf starcommanderonline.tar.gz 62 | 63 | rm -rf /home/meteoruser/production 64 | mkdir /home/meteoruser/production 65 | 66 | cd /home/meteoruser/upload/bundle 67 | mv * /home/meteoruser/production 68 | 69 | cd /home/meteoruser/production/programs/server 70 | npm install --production 71 | npm install stripe 72 | npm install paypal-rest-sdk 73 | #npm install sendgrid 74 | 75 | cd /home/meteoruser/production/ 76 | #node main.js 77 | forever start main.js 78 | --------------------------------------------------------------------------------