Welcome to the Oursky Deployment Project
Dependencies
- go v1.5
- https://github.com/tools/godep is used for managing go lib
- PostgreSQL if you are using pq implementation of skydb:
- Minimum version: 9.3
- Recommended version: 9.4
- zmq is used for connecting plugin
- brew install libsodium zeromq czmq
Development
$ go generate github.com/oursky/skygear/skydb/...
$ go build && ./skygear development.ini
config.ini can be provided in args or os ENV OD_CONFIG
.
Suggested to use fresh for local development
$ OD_CONFIG=development.ini fresh
Test
You may refer to .travis.yml
Prepare the testing DB
- Create test DB
skygear_test
on local PostgreSQL
- Enable PostGIS on
skygear_test
.
$ psql -c 'CREATE EXTENSION postgis;' -d skygear_test
- Test case assume the 127.0.0.1 have access to skygear_test, please add following to pg_hba.conf
host all all 127.0.0.1/32 trust
run go test github.com/oursky/skygear/...
For local development, you are suggested to open GoConvey to keep track of testing status.
refs: https://github.com/smartystreets/goconvey
Deploy to heroku
On .ini
,
- [http]host should left empty for using $PORT on heroku deployment
- [db]option should left empty for usign $DATABASE_URL on heroku deployment