networks:
  dokploy-network:
    external: true

volumes:
  logto-connectors:

services:
  logto:
    image: ghcr.io/logto-io/logto:1.27.0
    entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
    expose:
      - "3001"
      - "3002"
    environment:
      TRUST_PROXY_HEADER: 1
      DB_URL: ${LOGTO_DB_URL}
      ENDPOINT: ${LOGTO_ENDPOINT}
      ADMIN_ENDPOINT: ${LOGTO_ADMIN_ENDPOINT}
    volumes:
      - logto-connectors:/etc/logto/packages/core/connectors
    networks:
      dokploy-network:
        aliases:
          - logto
