https://github.com/redsift/sandbox-javascript
DAG Container for NodeJS
https://github.com/redsift/sandbox-javascript
nodejs platform sandbox sdk
Last synced: about 2 months ago
JSON representation
DAG Container for NodeJS
- Host: GitHub
- URL: https://github.com/redsift/sandbox-javascript
- Owner: redsift
- Created: 2015-11-25T12:22:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T18:25:29.000Z (about 2 years ago)
- Last Synced: 2025-05-21T00:13:41.364Z (about 1 year ago)
- Topics: nodejs, platform, sandbox, sdk
- Language: JavaScript
- Size: 508 KB
- Stars: 1
- Watchers: 19
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Sandbox for NodeJS
[](https://quay.io/repository/redsift/sandbox-javascript)
# Filesystem Layout and API
`SIFT_ROOT` Runs the sift made available in this path, defaults to `/run/sandbox/sift`
`IPC_ROOT` Uses Nanomsg req/rep sockets in this path, defaults to `/run/sandbox/ipc`. Node ordinality is used as the identity e.g. the 1st node in the DAG comunicates over `/run/sandbox/ipc/0.sock`
# Docker launch
`io.redsift.sandbox.install` CMD for one time install operations.
`io.redsift.sandbox.run` CMD for run operations.
Parameters are the node numbers you wish the script to install or execute.
# Running manually
docker run -u 7438
-v :/run/sandbox/sift
-v :/run/sandbox/ipc
quay.io/redsift/sandbox-javascript:v16.15.0
/usr/bin/redsift/run.js
0 1 2
`nn_req -X /run/sandbox/ipc/0.sock -D "{\"dummy\":1}" --raw`
# Running tests
- `npm ci`
- `npm test`
# Build docker
- `docker build -t quay.io/redsift/sandbox-javascript:some-custom-tag .`