From 92cdb70360d19711250af6035390f84e5c5ae66f Mon Sep 17 00:00:00 2001 From: Dalf Date: Fri, 10 Apr 2020 10:45:58 +0200 Subject: [PATCH] [mod] docker-compose.yaml: remove hardcoded IP --- Caddyfile | 6 +++--- docker-compose.yaml | 32 +++++++++++--------------------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/Caddyfile b/Caddyfile index 93663c9..f231d37 100644 --- a/Caddyfile +++ b/Caddyfile @@ -62,7 +62,7 @@ to /searx-checker/status.json } - proxy / 127.0.0.1:4040 { + proxy / localhost:4040 { transparent header_upstream X-Forwarded-TlsProto {tls_protocol} header_upstream X-Forwarded-TlsCipher {tls_cipher} @@ -72,11 +72,11 @@ } basicauth /filtron {$FILTRON_USER} {$FILTRON_PASSWORD} - proxy /filtron/rules 127.0.0.1:4041 { + proxy /filtron/rules localhost:4041 { without /filtron } - proxy /morty 127.0.0.1:3000 + proxy /morty localhost:3000 limits 10KB diff --git a/docker-compose.yaml b/docker-compose.yaml index 508dd4c..3dc6476 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -30,15 +30,13 @@ services: filtron: container_name: filtron image: dalf/filtron - hostname: filtron restart: always ports: - - 127.0.0.1:4040:4040 - - 127.0.0.1:4041:4041 + - 4040:4040 + - 4041:4041 networks: - searx: - ipv4_address: 10.10.10.3 - command: -listen 10.10.10.3:4040 -api 10.10.10.3:4041 -target 10.10.10.4:8080 + - 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 @@ -48,16 +46,14 @@ services: searx: container_name: searx image: searx/searx:latest - hostname: searx restart: always networks: - searx: - ipv4_address: 10.10.10.4 + - searx command: ${SEARX_COMMAND:-} volumes: - ./searx:/etc/searx:rw environment: - - BIND_ADDRESS=10.10.10.4:8080 + - BIND_ADDRESS=0.0.0.0:8080 - BASE_URL=https://${SEARX_HOSTNAME}/ - MORTY_URL=https://${SEARX_HOSTNAME}/morty/ - MORTY_KEY=${MORTY_KEY} @@ -72,14 +68,12 @@ services: morty: container_name: morty image: dalf/morty - hostname: morty restart: always ports: - - 127.0.0.1:3000:3000 + - 3000:3000 networks: - searx: - ipv4_address: 10.10.10.5 - command: -listen 10.10.10.5:3000 -timeout 6 -ipv6 + - searx + command: -listen 0.0.0.0:3000 -timeout 6 -ipv6 environment: - MORTY_KEY=${MORTY_KEY} logging: @@ -91,12 +85,10 @@ services: searx-checker: container_name: searx-checker image: searx/searx-checker - hostname: searx-checker restart: always networks: - searx: - ipv4_address: 10.10.10.6 - command: -cron -o html/data/status.json http://10.10.10.4:8080 + - searx + command: -cron -o html/data/status.json http://searx:8080 volumes: - searx-checker:/usr/local/searx-checker/html/data:rw @@ -104,8 +96,6 @@ networks: searx: ipam: driver: default - config: - - subnet: 10.10.10.0/24 volumes: searx-checker: