summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.docker/app/startup.sh6
-rw-r--r--.docker/app/updater.sh17
2 files changed, 20 insertions, 3 deletions
diff --git a/.docker/app/startup.sh b/.docker/app/startup.sh
index fd2e92f97..535d9f4ab 100644
--- a/.docker/app/startup.sh
+++ b/.docker/app/startup.sh
@@ -120,6 +120,12 @@ if [ -z "$TTRSS_NO_STARTUP_PLUGIN_UPDATES" ]; then
https://gitlab.tt-rss.org/tt-rss/plugins/ttrss-*.git)
NEW_ORIGIN_URL="https://github.com/tt-rss/tt-rss-plugin-${ORIGIN_URL#'https://gitlab.tt-rss.org/tt-rss/plugins/ttrss-'}"
;;
+ https://dev.tt-rss.org/tt-rss/ttrss-*.git)
+ NEW_ORIGIN_URL="https://github.com/tt-rss/tt-rss-plugin-${ORIGIN_URL#'https://dev.tt-rss.org/tt-rss/ttrss-'}"
+ ;;
+ https://dev.tt-rss.org/tt-rss/plugins/ttrss-*.git)
+ NEW_ORIGIN_URL="https://github.com/tt-rss/tt-rss-plugin-${ORIGIN_URL#'https://dev.tt-rss.org/tt-rss/plugins/ttrss-'}"
+ ;;
*)
NEW_ORIGIN_URL=""
;;
diff --git a/.docker/app/updater.sh b/.docker/app/updater.sh
index 5d4d183b8..c38ddd20d 100644
--- a/.docker/app/updater.sh
+++ b/.docker/app/updater.sh
@@ -1,4 +1,7 @@
#!/bin/sh -e
+#
+# this scripts waits for startup.sh to finish (implying a shared volume) and runs multiprocess daemon when working copy is available
+#
# We don't need those here (HTTP_HOST would cause false SELF_URL_PATH check failures)
unset HTTP_PORT
@@ -36,9 +39,12 @@ sleep 30
if ! id app; then
addgroup -g $OWNER_GID app
- adduser -D -h /var/www/html -G app -u $OWNER_UID app
+ adduser -D -h $APP_INSTALL_BASE_DIR -G app -u $OWNER_UID app
fi
+update-ca-certificates || true
+
+# TODO this should do a reasonable amount of attempts and terminate with an error
while ! pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER -p $TTRSS_DB_PORT; do
echo waiting until $TTRSS_DB_HOST is ready...
sleep 3
@@ -47,11 +53,16 @@ done
sed -i.bak "s/^\(memory_limit\) = \(.*\)/\1 = ${PHP_WORKER_MEMORY_LIMIT}/" \
/etc/php${PHP_SUFFIX}/php.ini
-DST_DIR=/var/www/html/tt-rss
+DST_DIR=$APP_INSTALL_BASE_DIR/tt-rss
while [ ! -s $DST_DIR/config.php -a -e $DST_DIR/.app_is_ready ]; do
echo waiting for app container...
sleep 3
done
-sudo -E -u app "${TTRSS_PHP_EXECUTABLE}" /var/www/html/tt-rss/update_daemon2.php "$@"
+# this is some next level bullshit
+# - https://stackoverflow.com/questions/65622914/why-would-i-get-a-php-pdoexception-complaining-that-it-cant-make-a-postgres-con
+# - fatal error: could not open certificate file "/root/.postgresql/postgresql.crt": Permission denied
+chown -R app:app /root # /.postgresql
+
+sudo -E -u app "${TTRSS_PHP_EXECUTABLE}" $APP_INSTALL_BASE_DIR/tt-rss/update_daemon2.php "$@"