summaryrefslogtreecommitdiff
path: root/.docker/app
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-05-24 13:10:28 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-05-24 13:10:28 +0300
commit52267d26394527fbda8cf6b5c8ba972fb0e70072 (patch)
tree69f6fe6622baac9f1eacf744fb7c194de2a4adff /.docker/app
parent9d4e945386b10e7dc0ef97b2abb0521bd84b9705 (diff)
remove APP_WEB_ROOT from fpm container because it expect a different value from nginx container, replace with APP_INSTALL_BASE_DIR specific to fpm container
Diffstat (limited to '.docker/app')
-rw-r--r--.docker/app/Dockerfile4
-rw-r--r--.docker/app/backup.sh2
-rw-r--r--.docker/app/startup.sh6
-rw-r--r--.docker/app/updater.sh6
4 files changed, 10 insertions, 8 deletions
diff --git a/.docker/app/Dockerfile b/.docker/app/Dockerfile
index 553f397e6..67bae0053 100644
--- a/.docker/app/Dockerfile
+++ b/.docker/app/Dockerfile
@@ -7,7 +7,9 @@ ARG ALPINE_MIRROR
ENV SCRIPT_ROOT=/opt/tt-rss
ENV SRC_DIR=/src/tt-rss/
-ENV APP_WEB_ROOT=/var/www/html
+
+# Normally there's no need to change this, should point to a volume shared with nginx container
+ENV APP_INSTALL_BASE_DIR=/var/www/html
# Used to centralize the PHP version suffix for packages and paths
ENV PHP_SUFFIX=84
diff --git a/.docker/app/backup.sh b/.docker/app/backup.sh
index f35a5086b..dbdc7e72d 100644
--- a/.docker/app/backup.sh
+++ b/.docker/app/backup.sh
@@ -2,7 +2,7 @@
DST_DIR=/backups
KEEP_DAYS=28
-APP_ROOT=$APP_WEB_ROOT/tt-rss
+APP_ROOT=$APP_INSTALL_BASE_DIR/tt-rss
if pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER -p $TTRSS_DB_PORT; then
DST_FILE=ttrss-backup-$(date +%Y%m%d).sql.gz
diff --git a/.docker/app/startup.sh b/.docker/app/startup.sh
index 3085edaf7..85c3f37dd 100644
--- a/.docker/app/startup.sh
+++ b/.docker/app/startup.sh
@@ -11,18 +11,18 @@ unset HTTP_HOST
if ! id app >/dev/null 2>&1; then
addgroup -g $OWNER_GID app
- adduser -D -h $APP_WEB_ROOT -G app -u $OWNER_UID app
+ adduser -D -h $APP_INSTALL_BASE_DIR -G app -u $OWNER_UID app
fi
update-ca-certificates || true
-DST_DIR=$APP_WEB_ROOT/tt-rss
+DST_DIR=$APP_INSTALL_BASE_DIR/tt-rss
[ -e $DST_DIR ] && rm -f $DST_DIR/.app_is_ready
export PGPASSWORD=$TTRSS_DB_PASS
-[ ! -e $APP_WEB_ROOT/index.php ] && cp ${SCRIPT_ROOT}/index.php $APP_WEB_ROOT
+[ ! -e $APP_INSTALL_BASE_DIR/index.php ] && cp ${SCRIPT_ROOT}/index.php $APP_INSTALL_BASE_DIR
if [ -z $SKIP_RSYNC_ON_STARTUP ]; then
if [ ! -d $DST_DIR ]; then
diff --git a/.docker/app/updater.sh b/.docker/app/updater.sh
index 782d52ca5..9d6dc15d7 100644
--- a/.docker/app/updater.sh
+++ b/.docker/app/updater.sh
@@ -12,7 +12,7 @@ sleep 30
if ! id app; then
addgroup -g $OWNER_GID app
- adduser -D -h $APP_WEB_ROOT -G app -u $OWNER_UID app
+ adduser -D -h $APP_INSTALL_BASE_DIR -G app -u $OWNER_UID app
fi
while ! pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER -p $TTRSS_DB_PORT; do
@@ -23,11 +23,11 @@ done
sed -i.bak "s/^\(memory_limit\) = \(.*\)/\1 = ${PHP_WORKER_MEMORY_LIMIT}/" \
/etc/php${PHP_SUFFIX}/php.ini
-DST_DIR=$APP_WEB_ROOT/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}" $APP_WEB_ROOT/tt-rss/update_daemon2.php "$@"
+sudo -E -u app "${TTRSS_PHP_EXECUTABLE}" $APP_INSTALL_BASE_DIR/tt-rss/update_daemon2.php "$@"