Hooligram Server
March 28, 2019 ยท View on GitHub
System setup (Ubuntu 18)
Go
sudo apt install wget gitwget -q https://storage.googleapis.com/golang/getgo/installer_linuxchmod +x installer_linux./installer_linuxgo versiongo get github.com/hooligram/hooligram-servercd ~/go/src/github.com/hooligram/hooligram-serverexport PORT=8080export TWILIO_API_KEY=<twilio-verify-api-key>- Verifyexport MYSQL_DB_NAME=hooligramexport MYSQL_USERNAME=<username>export MYSQL_PASSWORD=<password>govendor build./hooligram-server
MySQL DB
sudo apt updatesudo apt install mysql-serversudo systemctl status mysql- Make sure the Active status is active (running)sudo mysqlCREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';GRANT ALL PRIVILEGES ON hooligram.* TO '<username>'@'localhost' IDENTIFIED BY '<password>';CREATE DATABASE hooligram;
Deployment
AWS EC2
- Setup AWS EC2 instance (Ubuntu 18)
- Copy
hooligram-developer.pemto project root export IP_ADDR=<aws-ec2-ip-address>./deploy.sh
Heroku
git push heroku master
Logging
journalctl --pager-end --unit hooligram.service
Test
go test ./...