Archive for January, 2017

Configure Ubuntu to work as GO web server

Картинки по запросуI’m often creating go apps or services using Digital Ocean droplets with Ubuntu, that’s why I decided to create a script to automate configuration process.

 

The script is doing following:

  1. Installs and configures firewall (ufw, allows only ports 80, 443 & 22)
  2. Installs git (required by go)
  3. Installs mysql and secures it with mysql_install_db
  4. Installs the latest version of GO (1.7.5), configures go environment (PATH, GOPATH)
  5. Installs go application from public git repository, yours or my demo (development for private is in progress) with ‘go get’
  6. Configures go app to work as a service (add config into /etc/init.d), starts the service
  7. Installs and configures nginx to work as proxy for go app

Script can be started directly from github:

bash <(curl -s https://raw.githubusercontent.com/bykovme/webgolangdo/master/preparegolangapp.sh)

Check the script and find more information here: https://github.com/bykovme/webgolangdo

, , , , , , , , , , , , , ,

Leave a comment