/automata

REST API server for curhat app project

Primary LanguageGoMIT LicenseMIT

automata

REST API server for curhat app project.

Building a service

$ docker build -t bayu/automata:v0 .

Running a service

database service named postgres must running first.

$ docker run -d --env-file="data.env" --name automata --link postgres:database bayu/automata:v0

Deploy to heroku

create new apps first

$ heroku create -b https://github.com/kr/heroku-buildpack-go.git

make sure godep already installed, then checkout a new branch every deploy apps to heroku.

$ git checkout -b heroku-$VERSION dev
$ echo 'web: automata' > Procfile
$ godep save
$ git add Godeps/ Procfile && git commit -m "deploy to heroku"
$ git push heroku heroku-$VERSION:master -f

Manage database on heroku

requirements : psql

Connect to heroku database instance

$  heroku pg:psql --app APP_NAMR DATABASE_URL