name: mnote-convex

services:
  backend:
    # 说明：官方自托管镜像。需要时可将 :latest 固定为特定版本。
    image: ghcr.io/get-convex/convex-backend@sha256:2143ad479a997802e74ac52f5f1ce3d6e75309b1965e36069d1c939166e210eb
    stop_grace_period: 10s
    stop_signal: SIGINT
    ulimits:
      nofile:
        soft: 65535
        hard: 65535
    ports:
      - "3210:3210"
      - "3211:3211"
    volumes:
      - convex_data_v1:/convex/data
    env_file:
      - ../../.env.all
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3210/version"]
      interval: 5s
      start_period: 10s

  dashboard:
    image: ghcr.io/get-convex/convex-dashboard@sha256:a1fa8df3d320d1691c74bb9df7bb2c536bdef91ff3f5307b717dba97eec793d1
    stop_grace_period: 10s
    stop_signal: SIGINT
    ports:
      - "6791:6791"
    depends_on:
      backend:
        condition: service_healthy

volumes:
  convex_data_v1:
