create VPC
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 10.14.2
node -e "console.log('Running Node.js ' + process.version)"
sudo amazon-linux-extras install nginx1.12
alias be1='ssh -i '\''~/.ssh/trustmyv.pem'\'' [email protected]'
npm install
npm run build
zip -r dist.zip dist/
scp -i ~/.ssh/trustmyv.pem -r dist.zip [email protected]:/data/www/dist.zip
scp -i ~/.ssh/trustmyv.pem -r dist.zip [email protected]:/data/www/dist.zip
npm install
cd..
zip -r be.zip be/
scp -i ~/.ssh/trustmyv.pem -r sebe.zip [email protected]:/data/sebe.zip
- ssh to the server1 (non root user)
scp -i ~/.ssh/trustmyv.pem -r /data/sebe.zip [email protected]:/data/
- ssh to the server2 (non root user)
scp -i ~/.ssh/trustmyv.pem -r /data/sebe.zip [email protected]:/data/
- Security rules must allow 80 PORT or you cannot access from Internet Browser