Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.*.swp
.tags*
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:trusty

ENV MONGODB_URI=mongodb://localhost:27017/cube_development \
PORT=1080 \
EVALUATOR_AUTHENTICATOR=allow_all \
COLLECTOR_AUTHENTICATOR=allow_all

RUN apt-get update && apt-get -qq -y install \
python \
python-bcrypt \
npm \
nodejs \
nodejs-legacy \
> /dev/null \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
ADD ./ /app

RUN npm install && npm update

ENTRYPOINT ["node"]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,22 @@
**Cube** is a system for collecting timestamped events and deriving metrics. By collecting events rather than metrics, Cube lets you compute aggregate statistics *post hoc*. It also enables richer analysis, such as quantiles and histograms of arbitrary event sets. Cube is built on [MongoDB](http://www.mongodb.org) and available under the [Apache License](/square/cube/blob/master/LICENSE).

Want to learn more? [See the wiki.](https://github.com/square/cube/wiki)

## Docker

This branch supports building cube into a docker container. The dependencies are included as parts of them are not available in npm repositories anymore. This allows to create a container with the command:

`docker build -t cube .`

The image can be configured by changing the default values of those environment variables:

```bash
MONGODB_URI=mongodb://localhost:27017/cube_development
PORT=1080
EVALUATOR_AUTHENTICATOR=allow_all
COLLECTOR_AUTHENTICATOR=allow_all
```

Finally the container can be started for example with:

`docker run -p 1080:1080 -e MONGODB_URI=mongodb://mongodb:27017/cube cube bin/collector`