Add entrypoint script to docker-compose.yml for SearXNG service

- Introduced an entrypoint script to handle directory permissions for the SearXNG service, ensuring proper ownership and access rights.
- The script includes commands to change ownership and permissions of the /etc/searxng directory before starting the SearXNG application, enhancing security and functionality during container startup.
This commit is contained in:
Yury Kossakovsky
2025-05-22 13:33:56 -06:00
parent 0c24dd07f8
commit 767195b7ce

View File

@@ -346,6 +346,14 @@ services:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
entrypoint: |
sh -c "
echo 'Fixing SearXNG directory permissions...'
chown -R searxng:searxng /etc/searxng 2>/dev/null || true
chmod -R 755 /etc/searxng 2>/dev/null || true
echo 'Starting SearXNG...'
exec /usr/local/searxng/dockerfiles/docker-entrypoint.sh
"
cap_drop:
- ALL
cap_add: