-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added configuration to use a local token registry
- Loading branch information
Showing
7 changed files
with
260 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
version: "3.8" | ||
|
||
services: | ||
postgres: | ||
image: postgres:${POSTGRES_VERSION:-14.10-alpine} | ||
environment: | ||
- POSTGRES_LOGGING=true | ||
- POSTGRES_DB_FILE=/run/secrets/postgres_db | ||
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password | ||
- POSTGRES_USER_FILE=/run/secrets/postgres_user | ||
ports: | ||
- ${POSTGRES_PORT:-5432}:5432 | ||
secrets: | ||
- postgres_db | ||
- postgres_password | ||
- postgres_user | ||
shm_size: '2gb' | ||
volumes: | ||
- postgres14-data:/var/lib/postgresql/data | ||
restart: on-failure | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "200k" | ||
max-file: "10" | ||
|
||
cardano-node-ogmios: | ||
platform: linux/x86_64 | ||
image: cardanosolutions/cardano-node-ogmios:${OGMIOS_VERSION:-v6.2.0}_${CARDANO_NODE_VERSION:-8.9.0}-${NETWORK:-mainnet} | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "400k" | ||
max-file: "20" | ||
ports: | ||
- ${OGMIOS_PORT:-1337}:1337 | ||
restart: on-failure | ||
volumes: | ||
- node-db:/db | ||
- node-ipc:/ipc | ||
# Uncomment if you want to use your own config files or the provided ones. | ||
# Current configs are also available at: https://book.world.dev.cardano.org/ | ||
# - ./config/network/${NETWORK:-mainnet}:/config | ||
|
||
cardano-db-sync: | ||
platform: linux/x86_64 | ||
image: ghcr.io/intersectmbo/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.2.0.2} | ||
command: [ | ||
"--config", "/config/cardano-db-sync/config.json", | ||
"--socket-path", "/node-ipc/node.socket" | ||
] | ||
environment: | ||
- POSTGRES_HOST=postgres | ||
- POSTGRES_PORT=5432 | ||
- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-} | ||
- RESTORE_RECREATE_DB=N | ||
depends_on: | ||
- cardano-node-ogmios | ||
- postgres | ||
secrets: | ||
- postgres_password | ||
- postgres_user | ||
- postgres_db | ||
volumes: | ||
- ./config/network/${NETWORK:-mainnet}:/config | ||
- db-sync-data:/var/lib/cexplorer | ||
- node-ipc:/node-ipc | ||
restart: on-failure | ||
stop_signal: SIGINT | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "200k" | ||
max-file: "10" | ||
|
||
hasura: | ||
build: | ||
context: ./packages/api-cardano-db-hasura/hasura | ||
image: cardanofoundation/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION:-8.0.1} | ||
ports: | ||
- ${HASURA_PORT:-8090}:8080 | ||
depends_on: | ||
- "postgres" | ||
restart: on-failure | ||
environment: | ||
- HASURA_GRAPHQL_ENABLE_CONSOLE=true | ||
- HASURA_GRAPHQL_CORS_DOMAIN=http://localhost:9695 | ||
secrets: | ||
- postgres_db | ||
- postgres_password | ||
- postgres_user | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "200k" | ||
max-file: "10" | ||
|
||
background: | ||
build: | ||
cache_from: [ cardanofoundation/cardano-graphql-background:latest ] | ||
context: . | ||
target: background | ||
image: cardanofoundation/cardano-graphql-background:${CARDANO_GRAPHQL_VERSION:-8.0.1}-${NETWORK:-mainnet} | ||
depends_on: | ||
- "hasura" | ||
- "postgres" | ||
environment: | ||
- LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info} | ||
- METADATA_SERVER_URI=${METADATA_SERVER_URI:-http://token-metadata-registry:8080} | ||
restart: on-failure | ||
secrets: | ||
- postgres_db | ||
- postgres_password | ||
- postgres_user | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "200k" | ||
max-file: "10" | ||
|
||
server: | ||
platform: linux/x86_64 | ||
build: | ||
args: | ||
- NETWORK=${NETWORK:-mainnet} | ||
cache_from: [ inputoutput/cardano-graphql-server:latest ] | ||
context: . | ||
target: server | ||
image: cardanofoundation/cardano-graphql-server:${CARDANO_GRAPHQL_VERSION:-8.0.1}-${NETWORK:-mainnet} | ||
environment: | ||
- ALLOW_INTROSPECTION=true | ||
- CACHE_ENABLED=true | ||
- LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info} | ||
expose: | ||
- ${API_PORT:-3100} | ||
ports: | ||
- ${API_PORT:-3100}:3100 | ||
restart: on-failure | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "200k" | ||
max-file: "10" | ||
|
||
token-metadata-registry: | ||
build: | ||
context: . | ||
target: token-registry | ||
ports: | ||
- ${TOKEN_REGISTRY_PORT:-8080}:8080 | ||
environment: | ||
- TOKEN_METADATA_SYNC_JOB=true | ||
- POSTGRES_PORT=${POSTGRES_PORT:-5432} | ||
- POSTGRES_HOST=postgres | ||
- DB_SCHEMA=tokenregistry | ||
secrets: | ||
- postgres_db | ||
- postgres_password | ||
- postgres_user | ||
|
||
secrets: | ||
postgres_db: | ||
file: ./placeholder-secrets/postgres_db | ||
postgres_password: | ||
file: ./placeholder-secrets/postgres_password | ||
postgres_user: | ||
file: ./placeholder-secrets/postgres_user | ||
volumes: | ||
db-sync-data: | ||
node-db: | ||
node-ipc: | ||
postgres14-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
export DB_USERNAME=$(cat /run/secrets/postgres_user) | ||
export DB_PASSWORD=$(cat /run/secrets/postgres_password) | ||
export DB_NAME=$(cat /run/secrets/postgres_db) | ||
export DB_URL=jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/${DB_NAME}?currentSchema=${DB_SCHEMA} | ||
|
||
java -jar /app/app.jar |