Skip to content

Commit

Permalink
Merge branch 'master' into feature/env-adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
mytharcher committed Sep 13, 2018
2 parents 4ad1271 + 3253c5e commit 1cf0dd7
Show file tree
Hide file tree
Showing 37 changed files with 1,595 additions and 533 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
- checkout

# specify any bash command here prefixed with `run: `
- run: go get -v -t -d ./...
- run: go get -u github.com/golang/dep/cmd/dep
- run: dep ensure
- run:
name: Wait for DB
# preinstalled in circleci/* docker image
Expand Down
9 changes: 5 additions & 4 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DATABASE_URL=root@/test?multiStatements=true&parseTime=True

AMQP_URL=amqp://rabbitmq:rabbitmq@rabbit:5672/
CORECLIENT_URL=localhost:6815
DATABASE_URL=root@tcp(localhost:13307)/lws?multiStatements=true&parseTime=True
MQTT_URL=tcp://localhost:11883
AMQP_URL=amqp://rabbitmq:rabbitmq@rabbit:15672/
REDIS_URL=localhost:16379
CORECLIENT_URL=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
.DS_Store
vendor/
test/mock/
139 changes: 133 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 32 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,42 @@
branch = "master"
name = "github.com/jinzhu/gorm"

[[constraint]]
branch = "master"
name = "github.com/joho/godotenv"

[[constraint]]
name = "gopkg.in/gormigrate.v1"
version = "1.2.0"

[prune]
go-tests = true
unused-packages = true

[[constraint]]
name = "github.com/satori/go.uuid"
version = "1.2.0"

[[constraint]]
name = "github.com/go-sql-driver/mysql"
version = "1.3.0"

[[constraint]]
name = "github.com/golang/protobuf"
version = "1.2.0"

[[constraint]]
branch = "master"
name = "golang.org/x/crypto"

[[constraint]]
name = "github.com/eclipse/paho.mqtt.golang"
version = "1.1.1"

[[constraint]]
name = "github.com/gomodule/redigo"
version = "2.0.0"

[[constraint]]
name = "github.com/furdarius/rabbitroutine"
version = "0.4.0"

[[constraint]]
branch = "master"
name = "github.com/streadway/amqp"
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ dep ensure # sync and install all dependencies into `vender/`
dep ensure -add github.com/user/xxx-repo # something like `go get` but fetch package into `vendor/` and update Gopkg.toml/Gopkg.lock file
~~~

### Related 3rd-party Services

LWS requires MySQL, mqtt(mock server), RabbitMQ and redis as related services. In local development, we use Docker to manage them:

~~~shell
# where docker-compose.yml located
cd test/mock
# start services
docker-compose up -d
# stop services
docker-compose down
~~~

### Environment Variables

We are using [godotenv](https://github.com/joho/godotenv) to manange variables in `.env` file (no required). To install the command-line tool:
Expand Down
Loading

0 comments on commit 1cf0dd7

Please sign in to comment.