Skip to content

Instantly share code, notes, and snippets.

@Tanapruk
Last active December 12, 2018 11:38
Show Gist options
  • Save Tanapruk/d80e270745f2150cc59a46aa8d3f0cd2 to your computer and use it in GitHub Desktop.
Save Tanapruk/d80e270745f2150cc59a46aa8d3f0cd2 to your computer and use it in GitHub Desktop.
bin's devOps Workshop

create VPC

Instance Installation

Install NodeJS

  • 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)"

Install NGINX

  • sudo amazon-linux-extras install nginx1.12

alias with PEM File

Build and copy zip files to FE server

  • 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

Build and copy zip files to BE server

  • 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/

Root User

Cautions

  • Security rules must allow 80 PORT or you cannot access from Internet Browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment