services:
  vexdb:
    image: shuzhiyinhang/vexdb:3.0.0.28146
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - 1panel-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:5432
    environment:      
      - GS_USERNAME=${PANEL_DB_ROOT_USER}
      - GS_PASSWORD=${PANEL_DB_ROOT_PASSWORD}
      - USER_PRIVILEGE=sysadmin
      - DBCOMPATIBILITY=A
    volumes:
      - ./data/data:/home/postgres/data
      - ./data/etc:/home/postgres/vexdb/etc
    healthcheck:
      test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-p", "5432", "-q", "-U", "${PANEL_DB_ROOT_USER}"]
      start_period: 20s
      interval: 30s
      retries: 5
      timeout: 5s

networks:
  1panel-network:
    external: true
