ponysearch-docker/docker-compose.yaml
Alexandre Flament bdf5619765
[mod] upgrade to Caddy v2 (#44)
* Use docker image caddy:2-alpine
* Caddyfile: remove "limits 10KB"
* Caddyfile: URL /filtron/rules removes (filtron API still availabled on http://localhost:4041/rules )
* caddy storage are docker volumes (caddy-data and caddy-config). start.sh and stop.sh have been modified to keep these volumes.
* .env: Remove SEARX_PROTOCOL, SEARX_TLS, FILTRON_USER and FILTRON_PASSWORD variables.
* docker-compose.yml: filtron and morty listen on 127.0.0.1 (related to #38)

* Fix #37: settings ```SEARX_HOSTNAME=localhost:8888``` works as expected (https connection)
2020-07-13 08:12:32 +02:00

96 lines
2 KiB
YAML

version: '3.7'
services:
caddy:
container_name: caddy
image: caddy:2-alpine
network_mode: host
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- searx-checker:/srv/searx-checker:rw
- caddy-data:/data:rw
- caddy-config:/config:rw
environment:
- SEARX_HOSTNAME=${SEARX_HOSTNAME:-localhost}
- SEARX_TLS=${LETSENCRYPT_EMAIL:-internal}
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
- DAC_OVERRIDE
filtron:
container_name: filtron
image: dalf/filtron
restart: always
ports:
- "127.0.0.1:4040:4040"
- "127.0.0.1:4041:4041"
networks:
- searx
command: -listen 0.0.0.0:4040 -api 0.0.0.0:4041 -target searx:8080
volumes:
- ./rules.json:/etc/filtron/rules.json:rw
read_only: true
cap_drop:
- ALL
searx:
container_name: searx
image: searx/searx:latest
restart: always
networks:
- searx
command: ${SEARX_COMMAND:-}
volumes:
- ./searx:/etc/searx:rw
environment:
- BIND_ADDRESS=0.0.0.0:8080
- BASE_URL=https://${SEARX_HOSTNAME:-localhost}/
- MORTY_URL=https://${SEARX_HOSTNAME:-localhost}/morty/
- MORTY_KEY=${MORTY_KEY}
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
- DAC_OVERRIDE
morty:
container_name: morty
image: dalf/morty
restart: always
ports:
- "127.0.0.1:3000:3000"
networks:
- searx
command: -listen 0.0.0.0:3000 -timeout 6 -ipv6
environment:
- MORTY_KEY=${MORTY_KEY}
logging:
driver: none
read_only: true
cap_drop:
- ALL
searx-checker:
container_name: searx-checker
image: searx/searx-checker
restart: always
networks:
- searx
command: -cron -o html/data/status.json http://searx:8080
volumes:
- searx-checker:/usr/local/searx-checker/html/data:rw
networks:
searx:
ipam:
driver: default
volumes:
searx-checker:
caddy-data:
caddy-config: