services:
  meilisearch:
    container_name: ${CONTAINER_NAME}
    image: getmeili/meilisearch:v1.37.0
    restart: always
    networks:
      - opsmind-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:7700
    environment:
      MEILI_EXPERIMENTAL_DUMPLESS_UPGRADE: true
      MEILI_CONFIG_FILE_PATH: /config/config.toml
      MEILI_MASTER_KEY: ${MEILI_MASTER_KEY}
    volumes:
      - ./config:/config
      - ./data:/meili_data
      - ./dumps:/dumps
      - ./snapshots:/snapshots
    command: >
      sh -c '
      if [ "${MEILI_NO_ANALYTICS}" = "true" ]; then
        /bin/meilisearch
      else
        /bin/meilisearch --no-analytics
      fi'
    labels:
      createdBy: Apps
networks:
  opsmind-network:
    external: true
