-
Notifications
You must be signed in to change notification settings - Fork 101
/
export_env.sh
executable file
·61 lines (58 loc) · 1.92 KB
/
export_env.sh
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
# Source this with the CONTEXT and NETWORK env set, containing the full path and
# supported network name.
# e.g.
# CONTEXT=$PWD NETWORK=mainnet . ./scripts/export_env.sh
export BIN_DIR=${CONTEXT}/bin
export CONFIG_DIR=${CONTEXT}/config/network/${NETWORK}
export SECRETS_DIR=${CONTEXT}/placeholder-secrets
export STATE_DIR=${CONTEXT}/state/network/${NETWORK}
case "$NETWORK" in
mainnet)
API_PORT=3100
HASURA_PORT=8090
METADATA_SERVER_URI="https://tokens.cardano.org"
PG_ADMIN_PORT=8442
POSTGRES_PORT=5442
;;
testnet)
API_PORT=3101
HASURA_PORT=8091
METADATA_SERVER_URI="https://metadata.cardano-testnet.iohkdev.io"
OGMIOS_PORT=1338
PG_ADMIN_PORT=8443
POSTGRES_PORT=5443
;;
alonzo-qa)
API_PORT=3102
HASURA_PORT=8092
METADATA_SERVER_URI="https://metadata.cardano-testnet.iohkdev.io"
OGMIOS_PORT=1339
PG_ADMIN_PORT=8444
POSTGRES_PORT=5444
;;
alonzo-purple)
API_PORT=3103
HASURA_PORT=8093
METADATA_SERVER_URI="https://metadata.cardano-testnet.iohkdev.io"
OGMIOS_PORT=1340
PG_ADMIN_PORT=8445
POSTGRES_PORT=5445
;;
esac
export ALLOW_INTROSPECTION=true
export API_PORT
export CARDANO_NODE_CONFIG_PATH=${CONFIG_DIR}/cardano-node/config.json
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
export HASURA_CLI_PATH=${BIN_DIR}/hasura
export HASURA_PORT
export HASURA_URI=http://localhost:${HASURA_PORT}
export METADATA_SERVER_URI
export NETWORK
export OGMIOS_PORT
export POSTGRES_DB_FILE=${SECRETS_DIR}/postgres_db
export POSTGRES_PASSWORD_FILE=${SECRETS_DIR}/postgres_password
export PG_ADMIN_PORT
export POSTGRES_PORT
export POSTGRES_USER_FILE=${SECRETS_DIR}/postgres_user
export POSTGRES_HOST=localhost