From a967a249c280b9da47c191dbc02a6aaccd70b387 Mon Sep 17 00:00:00 2001 From: Adam French Date: Tue, 7 Apr 2026 12:57:16 +0100 Subject: [PATCH] Add base url to new containers --- .gitignore | 2 ++ docker-compose.yml | 5 ++++- nginx/nginx.conf.template | 4 ++-- nginx/nginx_dev.conf.template | 8 ++++---- searxng/Dockerfile | 7 +++++++ searxng/entrypoint.sh | 6 ++++++ searxng/settings.yml.template | 5 +++++ 7 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 searxng/Dockerfile create mode 100644 searxng/entrypoint.sh create mode 100644 searxng/settings.yml.template diff --git a/.gitignore b/.gitignore index 2b249a3..83f629c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ icecast2/fallback_music/* !icecast2/fallback_music/.gitkeep +searxng/settings.yml certbot/conf certbot/www backend/token/ @@ -7,6 +8,7 @@ backend/token/ gitea/config/app.ini gitea/data/* + gitea-runner/data/* # Rust build artifacts diff --git a/docker-compose.yml b/docker-compose.yml index 8f35e8c..8b81b5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -146,7 +146,9 @@ services: - uptime_kuma_data:/app/data searxng: - image: searxng/searxng:latest + build: + context: ./searxng + dockerfile: Dockerfile container_name: "${SEARXNG_HOST}" restart: unless-stopped networks: @@ -154,6 +156,7 @@ services: environment: - BASE_URL=https://www.${DOMAIN}/searxng/ - INSTANCE_NAME=searxng + - SEARXNG_SECRET_KEY=${SEARXNG_SECRET_KEY} volumes: - searxng_data:/etc/searxng diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index 84257f9..e621148 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -237,7 +237,7 @@ http { } location /uptime-kuma/ { - proxy_pass http://$UPTIMEKUMA_HOST:$UPTIMEKUMA_PORT/; + proxy_pass http://$UPTIMEKUMA_HOST:$UPTIMEKUMA_PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -264,7 +264,7 @@ http { } location /wallabag/ { - proxy_pass http://$WALLABAG_HOST:$WALLABAG_PORT/; + proxy_pass http://$WALLABAG_HOST:$WALLABAG_PORT; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/nginx/nginx_dev.conf.template b/nginx/nginx_dev.conf.template index 9303d34..6151ee2 100644 --- a/nginx/nginx_dev.conf.template +++ b/nginx/nginx_dev.conf.template @@ -164,7 +164,7 @@ http { } location /uptime-kuma/ { - proxy_pass http://$UPTIMEKUMA_HOST:$UPTIMEKUMA_PORT/; + proxy_pass http://$UPTIMEKUMA_HOST:$UPTIMEKUMA_PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -191,7 +191,7 @@ http { } location /wallabag/ { - proxy_pass http://$WALLABAG_HOST:$WALLABAG_PORT/; + proxy_pass http://$WALLABAG_HOST:$WALLABAG_PORT; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -327,7 +327,7 @@ http { } location /uptime-kuma/ { - proxy_pass http://$UPTIMEKUMA_HOST:$UPTIMEKUMA_PORT/; + proxy_pass http://$UPTIMEKUMA_HOST:$UPTIMEKUMA_PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -354,7 +354,7 @@ http { } location /wallabag/ { - proxy_pass http://$WALLABAG_HOST:$WALLABAG_PORT/; + proxy_pass http://$WALLABAG_HOST:$WALLABAG_PORT; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/searxng/Dockerfile b/searxng/Dockerfile new file mode 100644 index 0000000..82198e2 --- /dev/null +++ b/searxng/Dockerfile @@ -0,0 +1,7 @@ +FROM searxng/searxng:latest + +COPY settings.yml.template /searxng/settings.yml.template +COPY entrypoint.sh /searxng/entrypoint.sh +RUN chmod +x /searxng/entrypoint.sh + +ENTRYPOINT ["/searxng/entrypoint.sh"] diff --git a/searxng/entrypoint.sh b/searxng/entrypoint.sh new file mode 100644 index 0000000..8536fee --- /dev/null +++ b/searxng/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +envsubst < /searxng/settings.yml.template > /etc/searxng/settings.yml + +exec /usr/local/searxng/dockerfiles/docker-entrypoint.sh "$@" diff --git a/searxng/settings.yml.template b/searxng/settings.yml.template new file mode 100644 index 0000000..25b70cd --- /dev/null +++ b/searxng/settings.yml.template @@ -0,0 +1,5 @@ +use_default_settings: true + +server: + base_url: https://www.adam-french.co.uk/searxng/ + secret_key: "${SEARXNG_SECRET_KEY}"