Skip to content

Instantly share code, notes, and snippets.

@BladeWDR
Created January 7, 2025 02:04
Show Gist options
  • Save BladeWDR/87be3568379606f1e7cfcc765f710ecb to your computer and use it in GitHub Desktop.
Save BladeWDR/87be3568379606f1e7cfcc765f710ecb to your computer and use it in GitHub Desktop.
SearXNG docker stack
networks:
proxy:
external: true
# description: Self-hosted metasearch engine
# https://github.com/searxng/searxng-docker
# Copy the settings template in etc/searxng and save it as settings.yml in the same directory.
# Make sure you change the secret key.
services:
searxng:
image: searxng/searxng:${SEARXNG_DOCKER_TAG:-latest}
container_name: ${SEARXNG_CONTAINER_NAME:-searxng}
restart: unless-stopped
networks:
- proxy
env_file:
- .env
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- TZ=${TZ}
- UMASK=022
- SEARXNG_BASE_URL=https://search.example.com/
volumes:
- ${SEARXNG_VOLUME-./config}:/etc/searxng:rw
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
- DAC_OVERRIDE
labels:
- traefik.enable=true
- traefik.http.routers.searxng.entrypoints=https
- traefik.http.routers.searxng.rule=Host(`search.example.com`)
- traefik.http.services.searxng.loadbalancer.server.port=8080
- traefik.http.routers.searxng.tls=true
- traefik.http.routers.searxng.middlewares=default-headers@file
- com.centurylinklabs.watchtower.enable=${SEARXNG_WATCHTOWER_ENABLED:-true}
redis:
container_name: searxng-redis
networks:
- proxy
image: "redis:alpine"
command: redis-server --save "" --appendonly "no"
tmpfs:
- /var/lib/redis
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment