Skip to content

Commit

Permalink
Update makefile & docker compose config
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-snx committed Dec 20, 2024
1 parent 3cac5c0 commit d0c1ecc
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 33 deletions.
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,26 @@ extract:
docker compose run extractors uv run python main.py configs/arbitrum_sepolia.yaml

index:
docker compose run indexer --network_name base_mainnet --protocol_name synthetix
docker compose run indexer --network_name arbitrum_mainnet --protocol_name synthetix
docker compose -f docker-compose.indexers.yml up -d indexer-arbitrum-mainnet-synthetix
docker compose -f docker-compose.indexers.yml up -d indexer-base-mainnet-synthetix

ingest:
docker compose -f docker-compose.indexers.yml run indexer-arbitrum-mainnet-synthetix uv run scripts/clean_parquet.py
docker compose -f docker-compose.indexers.yml run indexer-base-mainnet-synthetix uv run scripts/clean_parquet.py
docker compose -f docker-compose.indexers.yml run indexer-arbitrum-mainnet-synthetix uv run scripts/import_parquet.py
docker compose -f docker-compose.indexers.yml run indexer-base-mainnet-synthetix uv run scripts/import_parquet.py

synths:
docker compose run transformer python scripts/get_synths.py

dbt: build
docker compose run transformer dbt run --target prod --profiles-dir profiles --profile synthetix
docker compose run transformer dbt run --target prod --profiles-dir profiles --profile clickhouse

seed-prod: build
docker compose run transformer dbt seed --target prod --profiles-dir profiles --profile synthetix
docker compose run transformer dbt seed --target prod --profiles-dir profiles --profile clickhouse

seed-dev: build
docker compose run transformer dbt seed --target dev --profiles-dir profiles --profile synthetix
docker compose run transformer dbt seed --target dev --profiles-dir profiles --profile clickhouse

dbt-op: build
docker compose run transformer dbt run --target prod-op --profiles-dir profiles --profile synthetix
docker compose run transformer dbt run --target prod-op --profiles-dir profiles --profile clickhouse
47 changes: 47 additions & 0 deletions docker-compose.indexers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:
indexer-arbitrum-mainnet-synthetix:
build:
context: ./indexers
dockerfile: Dockerfile
restart: always
networks:
- data
env_file:
- .env
environment:
- NETWORK_NAME=arbitrum_mainnet
- PROTOCOL_NAME=synthetix
volumes:
- ./parquet-data:/parquet-data

indexer-base-mainnet-synthetix:
build:
context: ./indexers
dockerfile: Dockerfile
restart: always
networks:
- data
env_file:
- .env
environment:
- NETWORK_NAME=base_mainnet
- PROTOCOL_NAME=synthetix
volumes:
- ./parquet-data:/parquet-data

indexer-listener:
build:
context: ./indexers
dockerfile: Dockerfile.listener
networks:
- data
restart: always
environment:
PYTHONUNBUFFERED: 1
volumes:
- ./parquet-data:/parquet-data

networks:
data:
external:
name: data_data
27 changes: 0 additions & 27 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,6 @@ services:
cpus: "4.0"
memory: 8192M

indexer:
build:
context: ./indexers
dockerfile: Dockerfile
networks:
- data
restart: always
env_file:
- .env
environment:
NETWORK_NAME: base_mainnet
PROTOCOL_NAME: synthetix
volumes:
- ./parquet-data:/parquet-data

indexer-listener:
build:
context: ./indexers
dockerfile: Dockerfile.listener
networks:
- data
restart: always
environment:
PYTHONUNBUFFERED: 1
volumes:
- ./parquet-data:/parquet-data

transformer:
image: ghcr.io/synthetixio/data/transformer:${VERSION}
build:
Expand Down

0 comments on commit d0c1ecc

Please sign in to comment.