Rafał Pawłow 7ecb9b212d Most followed channels query performance optimization (#22) | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
.github | %!s(int64=3) %!d(string=hai) anos | |
src | %!s(int64=3) %!d(string=hai) anos | |
tests | %!s(int64=3) %!d(string=hai) anos | |
.dockerignore | %!s(int64=4) %!d(string=hai) anos | |
.eslintrc.js | %!s(int64=3) %!d(string=hai) anos | |
.gitignore | %!s(int64=3) %!d(string=hai) anos | |
.huskyrc | %!s(int64=4) %!d(string=hai) anos | |
.prettierrc.js | %!s(int64=3) %!d(string=hai) anos | |
Dockerfile | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=3) %!d(string=hai) anos | |
docker-compose.yml | %!s(int64=3) %!d(string=hai) anos | |
jest-mongodb-config.js | %!s(int64=3) %!d(string=hai) anos | |
jest.config.js | %!s(int64=3) %!d(string=hai) anos | |
package.json | %!s(int64=3) %!d(string=hai) anos | |
schema.graphql | %!s(int64=3) %!d(string=hai) anos | |
tsconfig.build.json | %!s(int64=3) %!d(string=hai) anos | |
tsconfig.json | %!s(int64=3) %!d(string=hai) anos | |
yarn.lock | %!s(int64=3) %!d(string=hai) anos |
Orion is (currently) a view count service for Atlas. Its purpose is to count and provide number of view counts for every video in the content directory. At the moment it follows the most simplistic approach - it doesn't do any kind of verification so anyone can add a view count to a video.
yarn install
yarn run dev
Orion requires a MongoDB instance to work properly. The following env variables are used to point Orion to the correct instance:
ORION_MONGO_HOSTNAME
ORION_MONGO_PORT
ORION_MONGO_DATABASE
For ease of deployment the app was dockerized. There's also the docker-compose.yml
which will be the easiest to deploy as it contains the Orion and MongoDB and also sets all the required parameters.
First you will need to build the orion
image:
docker build --tag orion .
Then you can run the docker-compose
with Orion and MongoDB:
docker-compose up