-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.app.yml
More file actions
64 lines (62 loc) · 2.46 KB
/
Copy pathdocker-compose.app.yml
File metadata and controls
64 lines (62 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# CSB application stack against the REAL CSB chain (no simulated devnet).
#
# Prerequisite: a running CSB L1 (validators up, RPC reachable) — see
# docker-compose.validator.yml / docs/cloud-deployment.md.
#
# One-time: deploy the contract suite to the chain (writes deployments.json
# into the shared volume the app reads):
#
# CSB_RPC_URL='http://<node>:9650/ext/bc/<blockchainID>/rpc' \
# CSB_CHAIN_ID=8555 \
# CSB_DEPLOYER_KEY='<txAllowList-admin key>' \
# docker compose -f docker-compose.app.yml --profile deploy run --rm deployer
#
# Then run the UIs (wallet / explorer / admin) against the chain:
#
# CSB_RPC_URL='http://<node>:9650/ext/bc/<blockchainID>/rpc' \
# EXPLORER_PASSCODE='<strong passcode>' \
# docker compose -f docker-compose.app.yml up -d app
#
# If this runs on a validator host, CSB_RPC_URL can use the localhost-bound
# node API (http://172.17.0.1:9650/… or host networking) — the chain RPC
# itself stays private; only the gated app on :8080 is exposed.
services:
deployer:
build: .
profiles: ["deploy"]
environment:
CSB_RPC_URL: ${CSB_RPC_URL:?set CSB_RPC_URL to the CSB chain RPC}
CSB_CHAIN_ID: ${CSB_CHAIN_ID:-8555}
CSB_DEPLOYER_KEY: ${CSB_DEPLOYER_KEY:?set CSB_DEPLOYER_KEY (txAllowList admin)}
CSB_DEPLOYMENTS_FILE: /data/deployments.json
# Institutional role holders (default: deployer — fine for a pilot,
# multisigs for production):
COUNCIL_ADDR: ${COUNCIL_ADDR:-}
IDENTITY_ADDR: ${IDENTITY_ADDR:-}
ENFORCER_ADDR: ${ENFORCER_ADDR:-}
ISSUER_ADDR: ${ISSUER_ADDR:-}
# Set CSB_SEED_ACCOUNTS=1 to also create pilot/test accounts (test riel,
# Sokha/Dara/Vanna). On the real L1 those accounts must additionally be
# enabled in the txAllowList precompile before they can transact.
CSB_SEED_ACCOUNTS: ${CSB_SEED_ACCOUNTS:-0}
volumes:
- app-data:/data
command: >
sh -c "npx hardhat run scripts/deploy.js --network csbRemote &&
if [ \"$$CSB_SEED_ACCOUNTS\" = \"1\" ]; then
npx hardhat run scripts/seed-accounts.js --network csbRemote;
fi"
restart: "no"
app:
build: .
environment:
CSB_RPC_URL: ${CSB_RPC_URL:?set CSB_RPC_URL to the CSB chain RPC}
CSB_DEPLOYMENTS_FILE: /data/deployments.json
EXPLORER_PASSCODE: ${EXPLORER_PASSCODE:?set a strong EXPLORER_PASSCODE}
volumes:
- app-data:/data:ro
ports:
- "8080:8080"
restart: unless-stopped
volumes:
app-data: