services:
  surrealdb:
    container_name: surrealdb
    image: surrealdb/surrealdb:v2.0.0-alpha.9
    env_file:
      - .env
    entrypoint:
      - /surreal
      - start
      - --user
      - $DB_USER
      - --pass
      - $DB_PASSWORD
      - file:/data/surrealdb
    restart: always
    deploy:
      resources:
        reservations:
          cpus: 1.0
    ports:
      - 8000:8000
    volumes:
      - ./data:/data
    networks:
      - surrealdb

  wikidata-to-surrealdb:
    container_name: wikidata-to-surrealdb
    build:
      context: .
    env_file:
      - .env
    restart: no
    tty: true
    depends_on:
      - surrealdb
    volumes:
      - ./data:/data
    networks:
      - surrealdb

volumes:
  data:

networks:
  surrealdb:
