Skip to content

Commit

Permalink
fix typos in env and entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlp4 committed Oct 1, 2024
1 parent 6b0903c commit 3793cc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ POSTGRES_PORT=5432
POSTGRES_DB=cyberindex
POSTGRES_USER=cyber
POSTGRES_PASSWORD=1cyberindex1
POSTGRES_SSL=disable
POSTGRES_SSL=false

#hasura params
HASURA_PORT=8090
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ if [ ! -d "/root/.cyberindex/" ]
then
export $(cat /.env)
mkdir /root/.cyberindex
echo -e "chain:\n bech32_prefix: $CHAIN_PREFIX\n modules:\n - modules\n - messages\n - auth\n - consensus\n - daily refetch\n - message_type\n - bank\n - graph\n - grid\n - resources\n - wasm\nnode:\n type: remote\n config:\n rpc:\n client_name: \"cyberindex\"\n max_connections: 10\n address: \"$RPC_URL\"\n grpc:\n address: \"$GRPC_URL\"\n insecure: $GPRC_INSECURE:\n workers: $INDEX_WORKERS\n start_height: $START_HEIGHT\n average_block_time: 5s\n listen_new_blocks: $LISTEN_NEW_BLOCKS\n parse_old_blocks: $PARSE_OLD_BLOCKS\n parse_genesis: $PARSE_GENESIS\ndatabase:\n url: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB?sslmode=disable&search_path=public\n max_open_connections: 1\n max_idle_connections: 1\n partition_size: 100000\n partition_batch: 1000\n ssl_mode_enable: \"$POSTGRES_SSL\"\n ssl_root_cert: \"\"\n ssl_cert: \"\"\n ssl_key: \"\"\nlogging:\n level: $LOG_LEVEL\n format: text\nactions:\n host: 127.0.0.1\n port: 3000" >> /root/.cyberindex/config.yaml
echo -e "chain:\n bech32_prefix: $CHAIN_PREFIX\n modules:\n - modules\n - messages\n - auth\n - consensus\n - daily refetch\n - message_type\n - bank\n - graph\n - grid\n - resources\n - wasm\nnode:\n type: remote\n config:\n rpc:\n client_name: \"cyberindex\"\n max_connections: 10\n address: \"$RPC_URL\"\n grpc:\n address: \"$GRPC_URL\"\n insecure: $GPRC_INSECURE\n workers: $INDEX_WORKERS\n start_height: $START_HEIGHT\n average_block_time: 5s\n listen_new_blocks: $LISTEN_NEW_BLOCKS\n parse_old_blocks: $PARSE_OLD_BLOCKS\n parse_genesis: $PARSE_GENESIS\ndatabase:\n url: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB?sslmode=disable&search_path=public\n max_open_connections: 1\n max_idle_connections: 1\n partition_size: 100000\n partition_batch: 1000\n ssl_mode_enable: \"$POSTGRES_SSL\"\n ssl_root_cert: \"\"\n ssl_cert: \"\"\n ssl_key: \"\"\nlogging:\n level: $LOG_LEVEL\n format: text\nactions:\n host: 127.0.0.1\n port: 3000" >> /root/.cyberindex/config.yaml
fi

if [ ! -f "/root/.cyberindex/config.yaml" ]
then
export $(cat /.env)
echo -e "chain:\n bech32_prefix: $CHAIN_PREFIX\n modules:\n - modules\n - messages\n - auth\n - consensus\n - daily refetch\n - message_type\n - bank\n - graph\n - grid\n - resources\n - wasm\nnode:\n type: remote\n config:\n rpc:\n client_name: \"cyberindex\"\n max_connections: 10\n address: \"$RPC_URL\"\n grpc:\n address: \"$GRPC_URL\"\n insecure: $GPRC_INSECURE:\n workers: $INDEX_WORKERS\n start_height: $START_HEIGHT\n average_block_time: 5s\n listen_new_blocks: $LISTEN_NEW_BLOCKS\n parse_old_blocks: $PARSE_OLD_BLOCKS\n parse_genesis: $PARSE_GENESIS\ndatabase:\n url: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB?sslmode=disable&search_path=public\n max_open_connections: 1\n max_idle_connections: 1\n partition_size: 100000\n partition_batch: 1000\n ssl_mode_enable: \"$POSTGRES_SSL\"\n ssl_root_cert: \"\"\n ssl_cert: \"\"\n ssl_key: \"\"\nlogging:\n level: $LOG_LEVEL\n format: text\nactions:\n host: 127.0.0.1\n port: 3000" >> /root/.cyberindex/config.yaml
echo -e "chain:\n bech32_prefix: $CHAIN_PREFIX\n modules:\n - modules\n - messages\n - auth\n - consensus\n - daily refetch\n - message_type\n - bank\n - graph\n - grid\n - resources\n - wasm\nnode:\n type: remote\n config:\n rpc:\n client_name: \"cyberindex\"\n max_connections: 10\n address: \"$RPC_URL\"\n grpc:\n address: \"$GRPC_URL\"\n insecure: $GPRC_INSECURE\n workers: $INDEX_WORKERS\n start_height: $START_HEIGHT\n average_block_time: 5s\n listen_new_blocks: $LISTEN_NEW_BLOCKS\n parse_old_blocks: $PARSE_OLD_BLOCKS\n parse_genesis: $PARSE_GENESIS\ndatabase:\n url: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB?sslmode=disable&search_path=public\n max_open_connections: 1\n max_idle_connections: 1\n partition_size: 100000\n partition_batch: 1000\n ssl_mode_enable: \"$POSTGRES_SSL\"\n ssl_root_cert: \"\"\n ssl_cert: \"\"\n ssl_key: \"\"\nlogging:\n level: $LOG_LEVEL\n format: text\nactions:\n host: 127.0.0.1\n port: 3000" >> /root/.cyberindex/config.yaml
fi

exec "$@"

0 comments on commit 3793cc5

Please sign in to comment.