Skip to content

Commit 6b2de2e

Browse files
committed
feat: dockerize blockfrost-ryo
1 parent 7539b97 commit 6b2de2e

File tree

9 files changed

+80
-1
lines changed

9 files changed

+80
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
server:
2+
listenAddress: 0.0.0.0
3+
port: 3000
4+
prometheusMetrics: false
5+
debug: true
6+
network: "custom"
7+
tokenRegistryUrl: "https://metadata.cardano-testnet.iohkdev.io"
8+
mithril:
9+
enabled: false

compose/common.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ x-sdk-environment: &sdk-environment
110110
WEB_SOCKET_API_URL: ws://ws-server:3000/ws
111111

112112
services:
113+
blockfrost-ryo:
114+
build:
115+
context: "https://github.com/ginnun/blockfrost-backend-ryo.git#feat/custom-network-support"
116+
dockerfile: Dockerfile
117+
environment:
118+
BLOCKFROST_CONFIG_SERVER_LISTEN_ADDRESS: 0.0.0.0
119+
depends_on:
120+
cardano-db-sync:
121+
condition: service_started
122+
ports:
123+
- "3015:3000"
124+
113125
cardano-db-sync:
114126
<<:
115127
- *logging

packages/e2e/docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ x-logging: &logging
66
max-file: '10'
77

88
services:
9+
10+
blockfrost-ryo:
11+
depends_on:
12+
local-testnet:
13+
condition: service_healthy
14+
environment:
15+
NODE_ENV: local-network
16+
volumes:
17+
- ./local-network/config/network/blockfrost-ryo:/app/config
18+
919
local-testnet:
1020
<<: *logging
1121
build:

packages/e2e/local-network/scripts/make-babbage.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ for NODE in ${SP_NODES}; do
303303
echo "${ROOT}/${NODE}.sh"
304304
done
305305

306-
echo "Update start time in genesis files"
306+
echo "Update start time in genesis files with ${timeUnix}"
307307
sed_i -E "s/\"startTime\": [0-9]+/\"startTime\": ${timeUnix}/" ${ROOT}/genesis/byron/genesis.json
308308
sed_i -E "s/\"systemStart\": \".*\"/\"systemStart\": \"${timeISO}\"/" ${ROOT}/genesis/shelley/genesis.json
309309

@@ -359,6 +359,8 @@ cp "${ROOT}"/genesis/shelley/genesis.conway.json ./config/network/genesis/conway
359359

360360
mkdir -p "${ROOT}/run"
361361

362+
echo "${timeUnix}" > "${ROOT}/run/system_start"
363+
362364
echo "#!/usr/bin/env bash" >"${ROOT}/run/all.sh"
363365
echo "" >>"${ROOT}/run/all.sh"
364366
echo "" >>"${ROOT}/run/all.sh"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
timeUnix=$(cat network-files/run/system_start)
4+
5+
echo "Update start time in blockfrost genesis file with ${timeUnix}"
6+
7+
mkdir -p ./config/network/blockfrost-ryo/
8+
9+
cp ./templates/blockfrost-ryo/genesis.json ./config/network/blockfrost-ryo/genesis.json
10+
cp ./templates/blockfrost-ryo/byron_genesis.json ./config/network/blockfrost-ryo/byron_genesis.json
11+
cp ./templates/blockfrost-ryo/local-network.yaml ./config/network/blockfrost-ryo/local-network.yaml
12+
13+
sed -i -E "s/\"system_start\": [0-9]+/\"system_start\": ${timeUnix}/" ./config/network/blockfrost-ryo/genesis.json

packages/e2e/local-network/scripts/start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ trap 'kill 0' INT
2626

2727
echo "Run"
2828
./scripts/make-babbage.sh
29+
./scripts/prepare_blockfrost_ryo.sh
2930
./network-files/run/all.sh &
3031

3132
if [ -d /sdk-ipc ] ; then cp -a config/network /sdk-ipc/config ; fi
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"epoch_length": 100,
3+
"slot_length": 1,
4+
"safe_zone": 864,
5+
"end_epoch": 0
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"active_slots_coefficient": 0.05,
3+
"update_quorum": 5,
4+
"max_lovelace_supply": "45000000000000000",
5+
"network_magic": 888,
6+
"epoch_length": 1000,
7+
"system_start": 1000000,
8+
"slots_per_kes_period": 129600,
9+
"slot_length": 0.2,
10+
"max_kes_evolutions": 62,
11+
"security_param": 10
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
server:
2+
listenAddress: "0.0.0.0"
3+
port: 3000
4+
debug: true
5+
dbSync:
6+
host: "postgres"
7+
port: 5432
8+
database: "cexplorer"
9+
user: "postgres"
10+
password: "doNoUseThisSecret!"
11+
maxConnections: 5
12+
network: "custom"
13+
genesisDataFolder: '/app/config'
14+
tokenRegistryUrl: "https://metadata.cardano-testnet.iohkdev.io"

0 commit comments

Comments
 (0)