diff --git a/Dockerfile b/Dockerfile index 22765a7..e91b295 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,7 @@ COPY ./docker/apache/ /etc/apache2/ COPY . . EXPOSE 80 -EXPOSE 443 -ENV FOURGET_PROTO=http +ENV NS_PROTO=http CMD ["./docker/docker-entrypoint.sh"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 832044e..85b5ede 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,15 +1,10 @@ services: - fourget: - image: docker.io/library/4get + navisearch: + image: ark.sudovanilla.org/korbs/navisearch:amd64 + # image: ark.sudovanilla.org/korbs/navisearch:arm64 restart: unless-stopped environment: - - FOURGET_VERSION=1 - - FOURGET_SERVER_NAME=search.sudovanilla.org - + - NS_VERSION=1 + - NS_SERVER_NAME=search.sudovanilla.org ports: - - "80:80" - - "443:443" - - volumes: - - ./banners:/var/www/html/narvisearch/banner - - ./captcha:/var/www/html/narvisearch/data/captcha + - "1998:80" \ No newline at end of file diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index f2fef1b..19e0458 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -2,14 +2,14 @@ set -e # remove quotes from variable if present -FOURGET_PROTO="${FOURGET_PROTO%\"}" -FOURGET_PROTO="${FOURGET_PROTO#\"}" +NS_PROTO="${NS_PROTO%\"}" +NS_PROTO="${NS_PROTO#\"}" # make lowercase -FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'` +NS_PROTO=`echo $NS_PROTO | awk '{print tolower($0)}'` -if [ "$FOURGET_PROTO" = "https" ]; then +if [ "$NS_PROTO" = "https" ]; then echo "Using https configuration" cp /etc/apache2/https.conf /etc/apache2/httpd.conf else diff --git a/docker/gen_config.php b/docker/gen_config.php index d813f7b..8254add 100644 --- a/docker/gen_config.php +++ b/docker/gen_config.php @@ -7,12 +7,12 @@ $from_config = ($refl->getConstants()); $from_env = array(); $env = getenv(); -$fourget_env = array_filter($env, function($v, $k) { - return str_starts_with($k, "FOURGET"); +$NS_env = array_filter($env, function($v, $k) { + return str_starts_with($k, "NS"); }, ARRAY_FILTER_USE_BOTH); -foreach($fourget_env as $key => $val) { - $target_key = preg_replace('/^FOURGET_/', '', $key); +foreach($NS_env as $key => $val) { + $target_key = preg_replace('/^NS_/', '', $key); $from_env[$target_key] = trim($val, '\'"'); };