166 lines
4.6 KiB
YAML
166 lines
4.6 KiB
YAML
version: "3.9"
|
|
|
|
x-credentials:
|
|
&postgres-config
|
|
POSTGRES_HOSTNAME: database
|
|
POSTGRES_PORT: "5432"
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: postgres
|
|
|
|
services:
|
|
dispatcher:
|
|
image: cartesi/rollups-dispatcher:1.0.0
|
|
restart: always
|
|
depends_on:
|
|
state_server:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
environment:
|
|
RUST_LOG: info
|
|
RD_DAPP_DEPLOYMENT_FILE: /deployments/${NETWORK:?undefined NETWORK}/${DAPP_NAME:?undefined DAPP_NAME}.json
|
|
RD_ROLLUPS_DEPLOYMENT_FILE: /deployments/${NETWORK:?undefined NETWORK}/rollups.json
|
|
RD_EPOCH_DURATION: 86400
|
|
SC_GRPC_ENDPOINT: http://state_server:50051
|
|
SC_DEFAULT_CONFIRMATIONS: ${BLOCK_CONFIRMATIONS:?undefined BLOCK_CONFIRMATIONS}
|
|
TX_PROVIDER_HTTP_ENDPOINT: ${RPC_URL:?undefined RPC_URL}
|
|
AUTH_MNEMONIC: ${MNEMONIC:?undefined MNEMONIC}
|
|
TX_CHAIN_ID: ${CHAIN_ID:?undefined CHAIN_ID}
|
|
TX_CHAIN_IS_LEGACY: ${TX_LEGACY:-false}
|
|
TX_DEFAULT_CONFIRMATIONS: ${BLOCK_CONFIRMATIONS_TX:?undefined BLOCK_CONFIRMATIONS_TX}
|
|
REDIS_ENDPOINT: redis://redis:6379
|
|
volumes:
|
|
- ./deployments:/deployments:ro
|
|
|
|
state_server:
|
|
image: cartesi/rollups-state-server:1.0.0
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "bash -c 'echo \"\" > /dev/tcp/127.0.0.1/50051;'" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
environment:
|
|
RUST_LOG: info
|
|
SF_GENESIS_BLOCK: 0x1
|
|
SF_SAFETY_MARGIN: 20
|
|
BH_HTTP_ENDPOINT: ${RPC_URL:?undefined RPC_URL}
|
|
BH_WS_ENDPOINT: ${WSS_URL:?undefined WSS_URL}
|
|
BH_BLOCK_TIMEOUT: 120
|
|
|
|
advance_runner:
|
|
image: cartesi/rollups-advance-runner:1.0.0
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "--fail", "localhost:8080/healthz" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
server_manager:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./deployments:/deployments:ro
|
|
- machine:/var/opt/cartesi/machine-snapshots
|
|
environment:
|
|
RUST_LOG: info
|
|
SERVER_MANAGER_ENDPOINT: http://server_manager:5001
|
|
SESSION_ID: default_rollups_id
|
|
REDIS_ENDPOINT: redis://redis:6379
|
|
CHAIN_ID: ${CHAIN_ID:?undefined CHAIN_ID}
|
|
DAPP_CONTRACT_ADDRESS_FILE: /deployments/${NETWORK:?undefined NETWORK}/${DAPP_NAME:?undefined DAPP_NAME}.json
|
|
SNAPSHOT_DIR: /var/opt/cartesi/machine-snapshots
|
|
SNAPSHOT_LATEST: /var/opt/cartesi/machine-snapshots/latest
|
|
|
|
server_manager:
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "bash -c 'echo \"\" > /dev/tcp/127.0.0.1/5001;'" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- machine:/var/opt/cartesi/machine-snapshots
|
|
environment:
|
|
- SERVER_MANAGER_LOG_LEVEL=warning
|
|
- REMOTE_CARTESI_MACHINE_LOG_LEVEL=info
|
|
|
|
inspect_server:
|
|
image: cartesi/rollups-inspect-server:1.0.0
|
|
restart: always
|
|
ports:
|
|
- "5005:5005"
|
|
depends_on:
|
|
server_manager:
|
|
condition: service_healthy
|
|
environment:
|
|
RUST_LOG: info
|
|
INSPECT_SERVER_ADDRESS: 0.0.0.0:5005
|
|
SERVER_MANAGER_ADDRESS: server_manager:5001
|
|
SESSION_ID: default_rollups_id
|
|
|
|
indexer:
|
|
image: cartesi/rollups-indexer:1.0.0
|
|
restart: always
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
environment:
|
|
<<: *postgres-config
|
|
RUST_LOG: info
|
|
REDIS_ENDPOINT: redis://redis:6379
|
|
CHAIN_ID: ${CHAIN_ID:?undefined CHAIN_ID}
|
|
DAPP_CONTRACT_ADDRESS_FILE: /deployments/${NETWORK:?undefined NETWORK}/${DAPP_NAME:?undefined DAPP_NAME}.json
|
|
volumes:
|
|
- ./deployments:/deployments:ro
|
|
|
|
graphql_server:
|
|
image: cartesi/rollups-graphql-server:1.0.0
|
|
ports:
|
|
- "4000:4000"
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
environment:
|
|
RUST_LOG: info
|
|
GRAPHQL_HOST: "0.0.0.0"
|
|
GRAPHQL_PORT: "4000"
|
|
<<: *postgres-config
|
|
|
|
database:
|
|
image: postgres:13-alpine
|
|
ports:
|
|
- 5432:5432
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres || exit 1" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
environment:
|
|
- POSTGRES_PASSWORD=password
|
|
volumes:
|
|
- database-data:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:6-alpine
|
|
ports:
|
|
- 6379:6379
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "ping" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- redis-data:/data
|
|
|
|
volumes:
|
|
machine: {}
|
|
database-data: {}
|
|
redis-data: {}
|