From 71734199aa58ee65ace3fe5685eaced7404149de Mon Sep 17 00:00:00 2001 From: aptalca Date: Sun, 13 Mar 2022 16:36:25 -0400 Subject: [PATCH] make searchproviders.yaml user configurable --- README.md | 1 + readme-vars.yml | 1 + root/etc/cont-init.d/50-config | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index c462bb9..d232df3 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **13.03.21:** - Make searchproviders.yaml user configurable. * **11.03.21:** - Rebase to alpine 3.14. * **10.02.21:** - Revert to alpine 3.12 as php 7.4 broke laravel. * **10.02.21:** - Rebasing to alpine 3.13. diff --git a/readme-vars.yml b/readme-vars.yml index 94763f5..693f6b1 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -52,6 +52,7 @@ app_setup_block: | # changelog changelogs: + - { date: "13.03.21:", desc: "Make searchproviders.yaml user configurable." } - { date: "11.03.21:", desc: "Rebase to alpine 3.14." } - { date: "10.02.21:", desc: "Revert to alpine 3.12 as php 7.4 broke laravel." } - { date: "10.02.21:", desc: "Rebasing to alpine 3.13." } diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 2b42b61..0485d7a 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -15,6 +15,7 @@ mkdir -p \ echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \ /etc/nginx/fastcgi_params && \ rm -rf /heimdall && \ + cp /var/www/localhost/heimdall/app/searchproviders.yaml /var/www/localhost/heimdall/app/searchproviders.yaml.orig && \ chown -R abc:abc /var/www/localhost/heimdall # create symlinks @@ -43,6 +44,11 @@ done cp /var/www/localhost/heimdall/.env.example /config/www/.env && \ echo "generating app key" php /var/www/localhost/heimdall/artisan key:generate +# copy searchproviders if not exists and symlink +[[ ! -f /config/www/searchproviders.yaml ]] && \ + cp /var/www/localhost/heimdall/app/searchproviders.yaml.orig /config/www/searchproviders.yaml +rm -rf /var/www/localhost/heimdall/app/searchproviders.yaml +ln -s /config/www/searchproviders.yaml /var/www/localhost/heimdall/app/searchproviders.yaml # set queue driver to database sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env