networks:
  1panel-network:
    external: true
services:
  logto:
    container_name: logto
    entrypoint:
    - sh
    - -c
    - npm run cli db seed -- --swe && npm start
    env_file:
    - ./envs/global.env
    - .env
    environment:
    - NODE_ENV=production
    - PORT=3001
    - ADMIN_PORT=3002
    - TRUST_PROXY_HEADER=true
    - CASE_SENSITIVE_USERNAME=true
    - DB_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_NAME}
    image: svhd/logto:1.22.0
    labels:
      createdBy: Apps
    networks:
    - 1panel-network
    ports:
    - ${PANEL_APP_PORT_API}:3001
    - ${PANEL_APP_PORT_HTTP}:3002
    restart: always
