Git Product home page Git Product logo

o2r-substituter's Introduction

o2r-substituter

Build Status

Node.js implementation to load compendia from third party repositories and handle direct user uploads for the o2r web api.

Currently, it implements the endpoint /api/v1/substitution.

Requirements

  • Node.js >= 6.2
  • npm

Configuration

The configuration can be done via environment variables.

  • SUBSTITUTER_PORT Define on which port substituter should listen. Defaults to 8090.
  • SUBSTITUTER_MONGODB Required Location for the MongoDB. Defaults to mongodb://localhost/. You will very likely need to change this.
  • SUBSTITUTER_MONGODB_DATABASE Which database inside the mongo db should be used. Defaults to muncher.
  • SUBSTITUTER_BASEPATH The local path where compendia are stored. Defaults to /tmp/o2r/.
  • SESSION_SECRET String used to sign the session ID cookie, must match other microservices.

Development & Testing

npm install

# manually start mongodb, o2r-loader, and o2r-muncher
npm start

npm test

Dockerfile

The file Dockerfile is the basis for the Docker image published at Docker Hub.

To build and run locally use the following commands to start other required microservices

docker build --tag substituter .

docker run --name mongodb -d -p 27017:27017 mongo:3.4
docker run --name testmuncher -d -p 8080:8080 --link mongodb:mongodb -v /tmp/o2r:/tmp/o2r -v /var/run/docker.sock:/var/run/docker.sock -e MUNCHER_MONGODB=mongodb://mongodb:27017 -e DEBUG=* o2rproject/o2r-muncher:latest
docker run --name testloader  -d -p 8088:8088 --link mongodb:mongodb -v /tmp/o2r:/tmp/o2r -v /var/run/docker.sock:/var/run/docker.sock -e LOADER_MONGODB=mongodb://mongodb:27017 -e DEBUG=* loader

docker run --name testsubstituter -it -p 8090:8090 --link mongodb:mongodb -v /tmp/o2r:/tmp/o2r -e SUBSTITUTER_MONGODB=mongodb://mongodb:27017 -e DEBUG=* substituter

License

o2r-substituter is licensed under Apache License, Version 2.0, see file LICENSE.

Copyright (C) 2017 - o2r project.

o2r-substituter's People

Contributors

nuest avatar tekraft avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.