Klaudiusz Dembler 5af9fcf7a4 Add docker commands to README (#18) | 3 年之前 | |
---|---|---|
.github | 3 年之前 | |
src | 3 年之前 | |
tests | 3 年之前 | |
.dockerignore | 4 年之前 | |
.eslintrc.js | 3 年之前 | |
.gitignore | 3 年之前 | |
.huskyrc | 4 年之前 | |
.prettierrc.js | 4 年之前 | |
Dockerfile | 4 年之前 | |
README.md | 3 年之前 | |
docker-compose.yml | 3 年之前 | |
jest-mongodb-config.js | 3 年之前 | |
jest.config.js | 3 年之前 | |
package.json | 3 年之前 | |
schema.graphql | 3 年之前 | |
tsconfig.build.json | 3 年之前 | |
tsconfig.json | 3 年之前 | |
yarn.lock | 3 年之前 |
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