Skip to content

Commit

Permalink
docs(README): update development instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mnzaki committed Jun 4, 2021
1 parent 506ab21 commit d9af23e
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Docker Jolocom Interactions Demo
This is a demo of all interactions supported by the
[JolocomSDK](https://github.com/jolocom/jolocom-sdk). There is a React based
frontend, and a Hapi based backend integrated with the JolocomSDK.

A hosted version of this demo is available at https://interxns.jolocom.io

Expand All @@ -11,13 +14,25 @@ described below
### Service Agent (Backend)
This requires an LTS version of Node: 10 or 12 or 14

The `service_agent` needs to know its "public" facing "host:port" address to be
able to embed it in the interaction tokens, such that the SmartWallet can find
the agent.

To successfully go through the demo while running locally, change the
`SERVICE_HOSTPORT` environment variable that is used in the `yarn start` command
below, to a value that the mobile phone can access, probably the LAN IP address
of the computer that is running the `service_agent`, assuming the test
SmartWallet is on the same LAN

```sh
cd service_agent
yarn install
yarn start
SERVICE_HOSTPORT="192.168.1.42:9000" yarn start
```

### React App (Frontend)
In another terminal:

```sh
cd frontend
yarn install
Expand All @@ -26,7 +41,18 @@ yarn start
Visit the frontend development server at http://localhost:3000
and open the Web Console to see debugging output

## Deployment instructions
### Usage with the SmartWallet

The SmartWallet release builds require HTTP**S** connections, and cannot use
plain HTTP. To use this demo without SSL certificates (which is the case if
running in development) please use a **staging** build of the SmartWallet on
Android, available for download here:
https://jolocom.io/wp-content/uploads/smartwallet/smartwallet-staging-1.11.1.apk

## Production Deployment instructions
This demo is not suitable for any sort of "production" deployment, besides use
as a demo.

The repo comes with a [docker-compose.yml](./docker-compose.yml) that is
suitable for deployment accompanied by https://github.com/jolocom/docker-nginx-proxy
which automatically adds HTTPS support by issuing SSL certificates through
Expand All @@ -40,18 +66,3 @@ The configuration for the domain is taken from environment variables in
SERVICE_HOSTPORT: 'interxns.jolocom.io'
VIRTUAL_HOST: 'interxns.jolocom.io'
```

### Usage with the SmartWallet

The `service_agent` needs to know its "public" facing "host:port" address to be
able to embed it in the interaction tokens, such the the SmartWallet can find
the agent.

To successfully go through the demo, change the `SERVICE_HOSTPORT` environment
variable inside `docker-compose.yml` to a value that the mobile phone can
access, probably the LAN IP address of the computer running the `service_agent`,
assuming the test SmartWallet is on the same LAN

Also note that the SmartWallet release builds require HTTP**S** connections, and cannot use
plain HTTP. To use this demo without SSL certificates please use a **staging**
build of the SmartWallet on Android, available for download here: https://jolocom.io/wp-content/uploads/smartwallet/smartwallet-staging-1.11.1.apk

0 comments on commit d9af23e

Please sign in to comment.