version: "3.7"

services:
  searxng:
    container_name: searxng
    image: searxng/searxng:2022.11.11-3a765113
    restart: unless-stopped
    networks:
      - tipi_main_network
    volumes:
      - "${APP_DATA_DIR}/data:/etc/searxng"
    ports:
      - ${APP_PORT}:8080
    environment:
      - BIND_ADDRESS=0.0.0.0:8080
      - BASE_URL=${APP_PROTOCOL:-http}://${APP_DOMAIN}/
      - SECRET_KEY=${SEARXNG_SECRET_KEY}
    labels:
      traefik.enable: ${APP_EXPOSED}
      traefik.http.routers.searxng.rule: Host(`${APP_DOMAIN}`)
      traefik.http.routers.searxng.entrypoints: websecure
      traefik.http.routers.searxng.service: searxng
      traefik.http.routers.searxng.tls.certresolver: myresolver
      traefik.http.services.searxng.loadbalancer.server.port: 8080