name: travel-knowledge-graph services: postgres: image: postgres:16 container_name: travel-kg-postgres restart: unless-stopped environment: POSTGRES_USER: admin POSTGRES_PASSWORD: password POSTGRES_DB: kg_admin ports: - "${POSTGRES_PORT:-5433}:5432" volumes: - postgres-data:/var/lib/postgresql/data - ./snapshots/postgres/kg_admin_new2.dump:/snapshots/kg_admin_new2.dump:ro - ./docker/postgres-init/01-restore-snapshot.sh:/docker-entrypoint-initdb.d/01-restore-snapshot.sh:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U admin -d kg_admin"] interval: 10s timeout: 5s retries: 10 falkordb-seed: image: busybox:1.36 restart: "no" command: - sh - -c - | set -eu if [ ! -f /data/dump.rdb ]; then cp /snapshot/dump.rdb /data/dump.rdb fi ls -lh /data/dump.rdb volumes: - falkordb-data:/data - ./snapshots/falkordb/dump.rdb:/snapshot/dump.rdb:ro falkordb: image: falkordb/falkordb:latest container_name: travel-kg-falkordb restart: unless-stopped ports: - "${FALKORDB_PORT:-6380}:6379" - "${FALKORDB_BROWSER_PORT:-3002}:3000" volumes: - falkordb-data:/var/lib/falkordb/data depends_on: falkordb-seed: condition: service_completed_successfully healthcheck: test: ["CMD", "redis-cli", "-p", "6379", "PING"] interval: 10s timeout: 5s retries: 10 api: build: context: . dockerfile: Dockerfile image: travel-knowledge-graph-api:local container_name: travel-kg-api restart: unless-stopped environment: DATABASE_URL: postgresql://admin:password@postgres:5432/kg_admin DB_SCHEMA: kg_admin_new2 DB_MIGRATIONS_ENABLED: "false" FALKORDB_HOST: falkordb FALKORDB_PORT: "6379" FALKORDB_GRAPH: guiyang_new2 FALKORDB_PASSWORD: "" AUTH_SECRET: change-me-32-chars-minimum-secret AUTH_ALGORITHM: HS256 AUTH_TOKEN_EXPIRE_MINUTES: "480" AUTH_DEFAULT_USERNAME: admin@example.com AUTH_DEFAULT_PASSWORD: change-me DEFAULT_TENANT: CityGraph-new2 DEFAULT_PROJECT: CityGraph-new2 INGEST_API_KEYS: dev-key-1 LLM_API_BASE: "" LLM_API_KEY: "" LLM_MODEL: deepseek-chat LLM_TIMEOUT_SECONDS: "30" LLM_EXTRACTION_ENABLED: "false" AMAP_WEB_KEY: "" AMAP_JS_KEY: "" AMAP_SECURITY_JSCODE: "" GAODE_CRAWLER_PATH: "" ports: - "${API_PORT:-8102}:8000" depends_on: postgres: condition: service_healthy falkordb: condition: service_healthy healthcheck: test: [ "CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/v1/admin/health', timeout=5).read()", ] interval: 30s timeout: 5s start_period: 30s retries: 3 volumes: postgres-data: falkordb-data: