mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Fabric 2.2 removes official support for CouchDB 2.x. The migration to 3.1 was to address fsync issues in the underlying storage implementation in Couch. This change moves to CouchDB 3.1 which requires the user to now set an admin identity at startup. Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
64 lines
2.3 KiB
YAML
64 lines
2.3 KiB
YAML
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
version: '2'
|
|
|
|
networks:
|
|
test:
|
|
|
|
services:
|
|
couchdb0:
|
|
container_name: couchdb0
|
|
image: couchdb:3.1
|
|
# Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
|
|
# for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
|
|
environment:
|
|
- COUCHDB_USER=admin
|
|
- COUCHDB_PASSWORD=adminpw
|
|
# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
|
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
|
ports:
|
|
- "5984:5984"
|
|
networks:
|
|
- test
|
|
|
|
peer0.org1.example.com:
|
|
environment:
|
|
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
|
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
|
|
# The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
|
|
# provide the credentials for ledger to connect to CouchDB. The username and password must
|
|
# match the username and password set for the associated CouchDB.
|
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
|
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw
|
|
depends_on:
|
|
- couchdb0
|
|
|
|
couchdb1:
|
|
container_name: couchdb1
|
|
image: couchdb:3.1
|
|
# Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
|
|
# for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
|
|
environment:
|
|
- COUCHDB_USER=admin
|
|
- COUCHDB_PASSWORD=adminpw
|
|
# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
|
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
|
ports:
|
|
- "7984:5984"
|
|
networks:
|
|
- test
|
|
|
|
peer0.org2.example.com:
|
|
environment:
|
|
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
|
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984
|
|
# The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
|
|
# provide the credentials for ledger to connect to CouchDB. The username and password must
|
|
# match the username and password set for the associated CouchDB.
|
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
|
|
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw
|
|
depends_on:
|
|
- couchdb1
|