version: "3"
services:
  linux-build:
    container_name: linux-build
    working_dir: /root/node-duckdb
    tty: true
    stdin_open: true
    image: 059037012730.dkr.ecr.us-east-1.amazonaws.com/deepcrawl/odin-api:latest
    environment:
      YARN_CACHE_FOLDER: /yarn_cache
      GITHUB_TOKEN: $GITHUB_TOKEN
    volumes:
      - .:/root/node-duckdb
      - ~/.npmrc:/root/.npmrc
      - node-modules:/node_modules
      - yarn-cache:/yarn_cache
    entrypoint: ["sh", "-c"]
    command: ["yarn install && yarn prebuild:current-target"]

volumes:
  node-modules:
  yarn-cache:
  duckdb:
