services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: gearbox POSTGRES_PASSWORD: gearbox POSTGRES_DB: gearbox ports: - "5432:5432" volumes: - pgdata-dev:/var/lib/postgresql/data - ./docker/init-logto-db.sql:/docker-entrypoint-initdb.d/init-logto-db.sql healthcheck: test: ["CMD-SHELL", "pg_isready -U gearbox"] interval: 5s timeout: 3s retries: 5 logto: image: svhd/logto:latest depends_on: postgres: condition: service_healthy entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"] ports: - "3001:3001" - "3002:3002" environment: TRUST_PROXY_HEADER: "1" DB_URL: postgres://gearbox:gearbox@postgres:5432/logto ENDPOINT: ${LOGTO_ENDPOINT:-http://localhost:3001} ADMIN_ENDPOINT: ${LOGTO_ADMIN_ENDPOINT:-http://localhost:3002} volumes: pgdata-dev: