mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Update REST sample with Redis password (#629)
Signed-off-by: James Taylor <jamest@uk.ibm.com>
This commit is contained in:
parent
5edae7c444
commit
e7074ba941
3 changed files with 8 additions and 3 deletions
|
|
@ -121,6 +121,7 @@ TEST_NETWORK_HOME=$HOME/fabric-samples/test-network npm run generateEnv
|
|||
Start a Redis server (Redis is used to store the queue of submit transactions)
|
||||
|
||||
```shell
|
||||
export REDIS_PASSWORD=$(uuidgen)
|
||||
npm run start:redis
|
||||
```
|
||||
|
||||
|
|
@ -147,6 +148,7 @@ TEST_NETWORK_HOME=$HOME/fabric-samples/test-network AS_LOCAL_HOST=false npm run
|
|||
Start the sample REST server and Redis server
|
||||
|
||||
```shell
|
||||
export REDIS_PASSWORD=$(uuidgen)
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ version: '3'
|
|||
services:
|
||||
redis:
|
||||
image: 'redis'
|
||||
command: ['--maxmemory-policy','noeviction','--requirepass','${REDIS_PASSWORD}']
|
||||
ports:
|
||||
- 6379:6379
|
||||
networks:
|
||||
|
|
@ -12,9 +13,11 @@ services:
|
|||
image: 'ghcr.io/hyperledger/fabric-rest-sample:latest'
|
||||
command: ['start:dotenv']
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3000:3000
|
||||
env_file:
|
||||
- ./.env
|
||||
- ./.env
|
||||
environment:
|
||||
- REDIS_PASSWORD
|
||||
networks:
|
||||
- fabric_test
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
"start": "node --require source-map-support/register ./dist",
|
||||
"start:dotenv": "node --require source-map-support/register --require dotenv/config ./dist",
|
||||
"start:dev": "node --require source-map-support/register --require dotenv/config ./dist | pino-pretty",
|
||||
"start:redis": "docker run -p 6379:6379 --name fabric-sample-redis -d redis --maxmemory-policy noeviction",
|
||||
"start:redis": "docker run -p 6379:6379 --name fabric-sample-redis -d redis --maxmemory-policy noeviction --requirepass \"${REDIS_PASSWORD}\"",
|
||||
"test": "jest"
|
||||
},
|
||||
"author": "Hyperledger",
|
||||
|
|
|
|||
Loading…
Reference in a new issue