|
3 | 3 | [](https://travis-ci.org/brave-intl/bat-go) |
5 | 5 |
|
6 | | -## Building using docker |
7 | | - |
8 | | -You can build a docker image without installing the go toolchain. Ensure docker |
9 | | -is installed then run `make docker`. |
10 | | - |
11 | 6 | ## Developer Setup |
12 | 7 |
|
13 | 8 | 1. [Install Go 1.12](https://golang.org/doc/install) (NOTE: Go 1.10 and earlier will not work!) |
14 | 9 |
|
15 | | -2. Run `go get -d github.com/brave-intl/bat-go`. |
| 10 | +2. Clone this repo via `git clone https://github.com/brave-intl/bat-go` |
| 11 | + |
| 12 | +3. Build via `make` |
| 13 | + |
| 14 | +## Full environment via docker-compose |
| 15 | + |
| 16 | +Ensure docker and docker-compose are installed. |
16 | 17 |
|
17 | | -3. [dep](https://github.com/golang/dep) is used to install the dependencies. If you do not have dep, you need to [install it](https://github.com/golang/dep#setup). On mac: |
18 | | -`brew install dep` |
| 18 | +Ensure that your `.env` file is populated with values for each of the |
| 19 | +env vars that does not have a default in `docker-compose.yml`. |
19 | 20 |
|
20 | | -4. `cd` into `~/go/github.com/brave-intl/bat-go`, then run `dep ensure` to install the dependencies |
| 21 | +### Local prod-like environment |
21 | 22 |
|
22 | | -5. Build via `make` |
| 23 | +To bring up a prod-like environment, run `docker-compose up -d`. |
23 | 24 |
|
24 | | -6. Run the server executable `./grant-server` |
| 25 | +### Local dev environment |
| 26 | + |
| 27 | +To bring up a dev environment, run `make docker-up`. |
| 28 | + |
| 29 | +This brings up an additional vault service, used for integration testing of |
| 30 | +some auxiliary binaries. |
| 31 | + |
| 32 | +You can run the unit and integration tests via `make docker-test` |
| 33 | + |
| 34 | +## Building a prod image using docker |
| 35 | + |
| 36 | +You can build a docker image without installing the go toolchain. Ensure docker |
| 37 | +is installed then run `make docker`. |
0 commit comments