0.1.12 • Published 2 years ago

@jwalab/community-platform v0.1.12

Weekly downloads
14
License
Apache-2.0
Repository
github
Last release
2 years ago

Community Platform

Run a simplified JWA platform on your local machine:

  1. Learn about the platform and see what it can do
  2. Integrate your applications and games with the platform
  3. Discover new usages and share them with the community

Stack

The community platform starts the core JWA Platform services:

  1. The NATS.io message bus
  2. The REST ingress service (airlock)
  3. A mock authorization service for airlock
  4. A Tezos sandbox
  5. Observability tools

It then starts additional services:

  1. JWA Item Service
  2. Or run your own services on top of it

Getting started

To get started, all you need is a recent version of Docker, including Docker compose.

npm install -g @jwalab/community-platform

jwalab --help

Start the platform:

jwalab start

Tutorial

An online tutorial is available here: https://jwa-lab.github.io/platform-docs/

Options

Changing ports

It's possible that you have other applications running on ports that the Community Platform may want to use.

Here's the list of ports that will be mapped to your local machine:

ServiceDefault PortDescriptionOverride env variable
Tezos Sandbox20000The local Tezos Node. You may make RPC calls to this URLJWALAB_TZBOX_PORT
NATS4222NATS is the message bus. Port 4222 is the main port for pub/subJWALAB_NATS_PORT
Auth Service8999The Mock Auth Service that returns Bearer Tokens to authenticate with AirlockJWALAB_AUTH_SERVICE_PORT
Airlock8000The Platform's main port of entry, you will make all of the APIs calls via this portJWALAB_AIRLOCK_PORT
TzStats8001A useful tool for collecting stats on the Tezos SandboxJWALAB_TZSTATS_PORT
TzIndex8002A useful tool for exploring the Tezos SandboxJWALAB_TZINDEX_PORT
PostgreSQL5432The platform's DB for storing items, useful for debuggingJWALAB_POSTGRES_PORT
Swagger UI3000A Swagger UI for navigating the platform's documentationJWALAB_SWAGGER_PORT

If you'd like to remap any of those ports, simply set the port value to the corresponding environment variable override.

For instance, setting Airlock to a new port:

JWALAB_AIRLOCK_PORT=9000 jwalab start

.env

The platform currently doesn't support reading environment variables from a .env file, however, feel free to create one and store it where you want. You can load it an run the platform using this syntax:

export $(cat .env) && jwalab start

Currently used ports

There's a useful command to list all the ports being used by the platform, along with the environment variable to remap the port.

$ jwalab list-services

┌─────────┬─────────────────┬───────────────┬────────────────────────────┐
│ (index) │  Service Name   │  Mapped Port  │    ENV VAR for override    │
├─────────┼─────────────────┼───────────────┼────────────────────────────┤
│    0    │    'Airlock'    │ 'Not running' │   'JWALAB_AIRLOCK_PORT'    │
│    1    │ 'Auth Service'  │     8999      │ 'JWALAB_AUTH_SERVICE_PORT' │
│    2    │     'NATS'      │     4222      │     'JWALAB_NATS_PORT'     │
│    3    │  'PostgreSQL'   │     5432      │   'JWALAB_POSTGRES_PORT'   │
│    4    │  'Swagger UI'   │     8080      │   'JWALAB_SWAGGER_PORT'    │
│    5    │ 'Tezos Sandbox' │     20000     │    'JWALAB_TZBOX_PORT'     │
│    6    │    'TzIndex'    │     8002      │   'JWALAB_TZINDEX_PORT'    │
│    7    │    'TzStats'    │     8001      │   'JWALAB_TZSTATS_PORT'    │
└─────────┴─────────────────┴───────────────┴────────────────────────────┘

Commands

JWA_LAB - v0.1
Run a JWA Community platform (jwalab) on your local machine!


Options:
  -V, --version   output the version number
  -h, --help      display help for command

Commands:
  start           start the jwalab environment
  stop            stop the jwalab environment
  kill            kill the jwalab environment
  pull            download the latest versions of the platform's services
  tezos-client    run a command in the tezos-client
  granabox        run a command in granabox
  list-services   list all running services and the port they expose
  logs            view platform logs
  help [command]  display help for command
0.1.12

2 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago