Zachary Wasserman 5c349a458d Eliminate DB globals + refactor tests (#39)
* Eliminate global DB connections. Instead, one connection is established (with the underlying object supporting pooling) and passed through the gin.Context. This allows test/prod to inject the appropriate DB object into the context.
* Refactor tests appropriately for this new style of DB connection
* Fix a bug in the routing caught by refactoring of tests
2016-08-04 11:41:47 -07:00
2016-08-04 11:41:18 -04:00
2016-08-04 11:41:18 -04:00
2016-08-04 11:41:18 -04:00
2016-08-04 11:41:18 -04:00
2016-08-04 11:41:18 -04:00
2016-07-28 18:34:26 -04:00
2016-08-04 11:41:18 -04:00

Kolide

Build Status

Building

To build the code, run the following from the root of the repository:

go build -o kolide

Testing

To run the application's tests, run the following from the root of the repository:

go test

Or if you using the Docker development environment run:

docker-compose app exec go test

Development Environment

To set up a canonical development environment via docker, run the following from the root of the repository:

docker-compose up

Once completed, you can access the application at https://<your-docker-ip>:8080 where your-docker-ip is localhost in most native docker installations.

This requires that you have docker installed. At this point in time, automatic configuration tools are not included with this project.

If you'd like to shut down the virtual infrastructure created by docker, run the following from the root of the repository:

docker-compose down

Once you docker-compose up and are running the databases, you can re-build the code with:

docker-compose exec app go build -o kolide

and then run the following command to create the database tables:

docker-compose exec app ./kolide prepare-db

Docker Deployment

This repository comes with a simple Dockerfile. You can use this to easily deploy Kolide in any infrastructure context that can consume a docker image (heroku, kubernetes, rancher, etc).

To build the image locally, run:

docker build --rm -t kolide .

To run the image locally, simply run:

docker run -t -p 8080:8080 kolide
S
Description
No description provided
Readme MIT
1.6 GiB
Languages
Go 52.5%
TypeScript 37.5%
JavaScript 4.3%
PowerShell 1.4%
Augeas 0.9%
Other 3%