```yaml spicedb-api: image: &spicedb-image a...
# spicedb
y
Copy code
yaml
  spicedb-api:
    image: &spicedb-image authzed/spicedb:v1.19.1
    command: [ "serve" ]
    depends_on:
      spicedb-db:
        condition: service_healthy
    environment:
      # ...
    ports:
      # Metrics port
      - "9090:9090"
      # gRPC port
      - "50051:50051"

  # Runs at startup, ensures that migrations are run, and then exits 0
  init-spicedb-api:
    image: *spicedb-image
    depends_on:
      spicedb-db:
        condition: service_healthy
    # Run migrations using the spicedb binary
    command: [ "migrate", "HEAD" ]
    environment:
      # ...