Skip to content

Deployment

Andy Park edited this page Mar 27, 2018 · 7 revisions

Until we move over to our other production servers, here are the general deployment steps.

Specifications

  • Linode VPS
  • Ubuntu 16.04
  • DNS vps1.mycoralhealth.com

Deployment

  • cross compile your binary for GOOS=linux GOARCH=amd64
  • tip: if you are cross compiling on OSX, the Go toolchain doesn't work well with CGO. The mattn/sqlite package requires CGO so it's probably easiest to compile the binary under a Linux environment e.g. with Vagrant
  • scp your compiled binary to the live server [email protected]
  • ssh into the server ssh [email protected]
  • move your binary to /opt/healthtip
  • if you made changes to the db schema, scp and move your coral.db to the same folder
  • restart the app with sudo systemctl restart healthtip
  • if you made changes to any of the web components, they reside in /var/www/html so you'll have to scp and move your js and any other static files there
  • probably best to leave the .env file on the server alone unless you are intentionally making changes to it
  • test it to make sure everything is working correctly https://tips.mycoralhealth.com
Clone this wiki locally