cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

Pull and Run via Docker Compose - testnet #677

Closed Robinyo closed 2 years ago

Robinyo commented 2 years ago

The example script does not export some environment variables (i.e., RESTORE_SNAPSHOT, API_PORT, HASURA_PORT, OGMIOS_PORT, POSTGRES_PORT):

export NETWORK=testnet &&\
docker pull inputoutput/cardano-graphql:6.2.0-${NETWORK} &&\
docker pull inputoutput/cardano-graphql-hasura:6.2.0 &&\
docker pull cardanosolutions/cardano-node-ogmios:v5.1.0-${NETWORK} &&\
RESTORE_SNAPSHOT=https://updates-cardano-testnet.s3.amazonaws.com/cardano-db-sync/12/db-sync-snapshot-schema-12-block-3185999-x86_64.tgz \
API_PORT=3101 \
HASURA_PORT=8091 \
OGMIOS_PORT=1338 \
POSTGRES_PORT=5433 \
docker-compose -p ${NETWORK} up -d &&\
docker-compose -p ${NETWORK} logs -f

Updated example:

export NETWORK=testnet && \
export POSTGRES_VERSION=11.5-alpine && \
export CARDANO_NODE_OGMIOS_VERSION=v5.1.0 && \
export CARDANO_DB_SYNC_VERSION=12.0.0 && \
export CARDANO_GRAPHQL_VERSION=6.2.0 && \
docker pull inputoutput/cardano-graphql:${CARDANO_GRAPHQL_VERSION}-${NETWORK} && \
docker pull inputoutput/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION} && \
docker pull cardanosolutions/cardano-node-ogmios:${CARDANO_NODE_OGMIOS_VERSION}-${NETWORK} && \
export RESTORE_SNAPSHOT=https://updates-cardano-testnet.s3.amazonaws.com/cardano-db-sync/12/db-sync-snapshot-schema-12-block-3298999-x86_64.tgz && \
export API_PORT=3101 && \
export HASURA_PORT=8091 && \
export OGMIOS_PORT=1338 && \
export POSTGRES_PORT=5433 && \
export PROMETHEUS_PORT=9090 && \
export GRAFANA_PORT=3000 && \
docker-compose -p ${NETWORK} up -d && \
docker-compose -p ${NETWORK} logs -f
rhyslbw commented 2 years ago

It's intentional, as those vars only apply to the up command. Are you having an issue that this addresses?

malingzhao commented 2 years ago

The graphql ip and port can't be one ,

malingzhao commented 2 years ago

The first time it is ok , But After I restart it , It can't work, Does this releated to the machine iops

rhyslbw commented 2 years ago

Closing as stale. @malingzhao, please open a new issue if you still require assistance