The Marketplace Service serves as an index to display curated services on the SingularityNet DApp.
These instructions are intended to facilitate the development and testing of SingularityNET Marketplace Service.
- python 3.6.5+
- pip 9.0.1+
- Additionally you should install the python dependency package present in requirements.txt.
- npm 3.5.2+
- Additionally you should install the external dependency package present in package.json.
If you use Ubuntu (or any Linux distribution with APT package support) you should do the following:
$ git clone [email protected]:singnet/snet-marketplace-service.git
$ cd snet-marketplace-service
$ pip install -r requirements.txt
$ npm install
Provide following environment variable in repository.py
environment variables | value |
---|---|
DB_HOST | |
DB_USER | |
DB_PASSWORD | |
DB_NAME | |
DB_PORT |
We use AWS Lambda(serverless architecture) for deployment.
In order to use the service with docker, the docker should be up and running in the host. Please follow the instruction from the docker link for installation.
- Download the snet-marketplace-service and then snet-contract-event-consumer in the root directory.
$ git clone https://github.com/singnet/snet-marketplace-service.git
$ cd snet-marketplace-service
$ git clone https://github.com/singnet/snet-contract-event-consumer.git
- Fill up the DB values in the### Installation
snet-marketplace-service/snet-contract-event-consumer/config.js
andsnet-marketplace-service/common/constant.py
- Build the Docker image.
$ cd snet-marketplace-service
$ docker build -t marketplace-event-consumer .
- Once the image is built, run the container with the below command.
$ docker run marketplace-event-consumer:latest