Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Merged
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
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ WORKDIR /app
COPY . /app

RUN pip install --upgrade --no-cache-dir -r requirements.txt

ENV PYTHONPATH=.

CMD ["python", "scripts/manage.py", "runserver", "-t 0.0.0.0", "-p 5000"]
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
docker:
@docker build -t mozilla/onyx .

run:
@docker run -d -p 5000:5000 --name onyx mozilla/onyx

start:
@docker start onyx

stop:
@docker stop onyx

log:
@docker logs -f onyx

clean:
@docker rm -f onyx

.PHONY: docker run start stop log clean
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
# onyx
# Onyx

[![Build Status](https://travis-ci.org/oyiptong/onyx.svg?branch=master)](https://travis-ci.org/oyiptong/onyx)
[![Build Status](https://travis-ci.org/mozilla/onyx.svg?branch=master)](https://travis-ci.org/mozilla/onyx)
[![Coverage Status](https://coveralls.io/repos/oyiptong/onyx/badge.png?branch=master)](https://coveralls.io/r/oyiptong/onyx?branch=master)

Link server and engagement metrics aggregator for Firefox Directory Links

# Install
```sh
# install Onyx in a local Python virtualenv
$ ./setup-project.sh

# run the dev server at localhost:5000
$ manage.py runserver

# ping the server
$ curl -v localhost:5000/__heartbeat__
```

# Run within docker

You can run Onyx within docker (Note: *NOT* for production).

```sh
# build the Onyx docker image locally
$ make docker

# run the container at localhost:5000
$ make run

# tail the logs
$ make log

# stop the container
$ make stop

# start the stopped container
$ make start

# remove the container
$ make clean
```

# Links

There are a few API endpoints we care about:

* [/v2/links/fetch/`locale`](#v2linksfetchlocale)
Expand Down