From 4be92cad70aa0251fc4d9542546517f95e4c90dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Thu, 23 Mar 2023 10:55:57 +0100 Subject: [PATCH] add searxng --- .env | 5 ++++- docker-compose.yml | 35 +++++++++++++++++++++++++++++++---- searxng.env | 1 + 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 searxng.env diff --git a/.env b/.env index 71bda8c..f17999b 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ REGISTRY_URL=registry.kucharczyk.xyz +DOMAIN=kucharczyk.xyz TZ=Europe/Prague STORAGE_PATH=/srv/mergerfs/storage DOCKER_STORAGE_PATH=/docker @@ -69,4 +70,6 @@ SYNCTHING_INTERNAL_PORT2=22000/tcp SYNCTHING_EXTERNAL_PORT3=22000 SYNCTHING_INTERNAL_PORT3=22000/udp SYNCTHING_EXTERNAL_PORT4=21027 -SYNCTHING_INTERNAL_PORT4=21027/udp \ No newline at end of file +SYNCTHING_INTERNAL_PORT4=21027/udp +SEARXNG_EXTERNAL_PORT=8082 +SEARXNG_INTERNAL_PORT=8080 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 23f61fb..962f1f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,14 +37,13 @@ services: - "${SNIBOX_EXTERNAL_PORT}:${SNIBOX_CADDY_INTERNAL_PORT}" user: ${PUID} volumes: - # - "${DOCKER_STORAGE_PATH}/caddy/data:/data" - # - "${DOCKER_STORAGE_PATH}/caddy/config:/config" - # - "${DOCKER_STORAGE_PATH}/caddy/Caddyfile:/etc/caddy/Caddyfile" - "${DOCKER_STORAGE_PATH}/caddy/config:/etc/caddy/" - # - "${DOCKER_STORAGE_PATH}/caddy/srv:/srv" - "/www/notes:/srv/notes" - "timetracker-static:/srv/timetracker" - "snibox-static:/srv/snibox" + environment: + - SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME:-http://localhost:80} + - SEARXNG_TLS=${LETSENCRYPT_EMAIL:-internal} networks: - public - caddy @@ -52,6 +51,10 @@ services: - infra - base restart: unless-stopped + # cap_drop: + # - ALL + # cap_add: + # - NET_BIND_SERVICE timetracker: image: ${REGISTRY_URL}/timetracker @@ -616,6 +619,30 @@ services: networks: - public + searxng: + container_name: searxng + image: searxng/searxng:latest + networks: + - caddy + - redis + ports: + - "${SEARXNG_EXTERNAL_PORT}:${SEARXNG_INTERNAL_PORT}" + volumes: + - "${DOCKER_STORAGE_PATH}/searxng:/etc/searxng:rw" + environment: + - SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/ + cap_drop: + - ALL + cap_add: + - CHOWN + - SETGID + - SETUID + logging: + driver: "json-file" + options: + max-size: "1m" + max-file: "1" + networks: loki: caddy: diff --git a/searxng.env b/searxng.env new file mode 100644 index 0000000..711555c --- /dev/null +++ b/searxng.env @@ -0,0 +1 @@ +SEARXNG_HOSTNAME=search.$DOMAIN \ No newline at end of file