This microservice implements the process of downloading media. Media service does not have direct access to DB. Validation of input and auth stay on rair-node side. For service communication use axios request. Status of upload should be visible (use socket).
const decryptNode = require('decrypt-node');
// TODO: DEMONSTRATE API
This will build the rair node, but IPFS will not be functioning locally, as additional configuration is necesary to communicate outside of the container. This is currently observing an external IPFS cluster, as noted in the .env file.
docker build -t media-service .
docker run -it --rm -p 5000:5000 -p 3000:3000 -p 5001:5001 -p 4001:4001 -p 8080:8080 rairnode
Optionally, use -d flag to run as a daemon
Have to be set current value of ADMIN_CONTRACT
variable in .env
file
For correct work of sessions we need to set
SESSION_SECRET
- any string
SESSION_TTL
- number of hours (default 12)
Logs to Sentry will collect only for Production environment
PRODUCTION
- has to be "true"
SENTRY_DSN
- should be provided Sentry Data Source Name
- /ms/api
- /v1
- /media/upload - POST - Upload the media, see details here
- /v1