这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ searxng-docker.service
caddy
srv
searxng/uwsgi.ini
.env
1 change: 0 additions & 1 deletion Caddyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
admin off

log {
output stderr
format filter {
Expand Down
26 changes: 15 additions & 11 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ services:
caddy:
container_name: caddy
image: docker.io/library/caddy:2-alpine
network_mode: host
restart: unless-stopped
ports:
- "80:80"
- "443:443" # HTTPS on localhost:443
networks:
- searxng
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data:rw
- caddy-config:/config:rw
- ${DATA_DIR}/caddy/data:/data:rw
- ${DATA_DIR}/caddy/config:/config:rw
environment:
- SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME:-http://localhost}
- SEARXNG_TLS=${LETSENCRYPT_EMAIL:-internal}
- SEARXNG_HOSTNAME=localhost
- SEARXNG_TLS=internal
cap_drop:
- ALL
cap_add:
Expand All @@ -26,12 +30,12 @@ services:
redis:
container_name: redis
image: docker.io/valkey/valkey:8-alpine
command: valkey-server --save 30 1 --loglevel warning
command: valkey-server --save 30 1 --loglevel warning --dir /data
restart: unless-stopped
networks:
- searxng
volumes:
- valkey-data2:/data
- redis-data:/data:rw
cap_drop:
- ALL
cap_add:
Expand All @@ -53,11 +57,12 @@ services:
ports:
- "127.0.0.1:8080:8080"
volumes:
- ./searxng:/etc/searxng:rw
- ${DATA_DIR}/searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
- REDIS_URL=redis://redis:6379/0
cap_drop:
- ALL
cap_add:
Expand All @@ -72,8 +77,7 @@ services:

networks:
searxng:
driver: bridge

volumes:
caddy-data:
caddy-config:
valkey-data2:
redis-data: