version: "3.2"

services:
  foundry:
    restart: unless-stopped
    depends_on:
      - ipld-eth-db
    build: ./
    environment:
      DB_USER: vdbm
      DB_NAME: vulcanize_testing
      DB_HOST: ipld-eth-db
      DB_PORT: 5432
      DB_PASSWORD: password
      DB_WRITE: "true"
      DB_TYPE: postgres
      DB_DRIVER: sqlx
      DB_WAIT_FOR_SYNC: "true"
    ports:
      - "127.0.0.1:8545:8545"
      - "127.0.0.1:8546:8546"

  ipld-eth-db:
    restart: always
    image: vulcanize/ipld-eth-db:v3.0.6
    environment:
      POSTGRES_USER: "vdbm"
      POSTGRES_DB: "vulcanize_testing"
      POSTGRES_PASSWORD: "password"
    volumes:
      - vdb_db_eth_server:/var/lib/postgresql/data
    ports:
      - "127.0.0.1:8077:5432"
    command: ["postgres", "-c", "log_statement=all"]

volumes:
  vdb_db_eth_server:
