1
0
Fork 0
mirror of https://git.tt-rss.org/fox/ttrss-docker-compose synced 2025-06-10 10:49:53 +02:00

only create app user if it doesn't exist

This commit is contained in:
Andrew Dolgov 2020-01-23 18:54:42 +03:00
parent 1fd912cda6
commit 4bd33353f4
2 changed files with 8 additions and 4 deletions

View file

@ -5,8 +5,10 @@ while ! pg_isready -h $DB_HOST -U $DB_USER; do
sleep 3 sleep 3
done done
if ! id app; then
addgroup -g $OWNER_GID app addgroup -g $OWNER_GID app
adduser -D -h /var/www/html -G app -u $OWNER_UID app adduser -D -h /var/www/html -G app -u $OWNER_UID app
fi
DST_DIR=/var/www/html/tt-rss DST_DIR=/var/www/html/tt-rss
SRC_DIR=/src/tt-rss/ SRC_DIR=/src/tt-rss/

View file

@ -3,8 +3,10 @@
# wait for the app container to delete .app_is_ready and perform rsync, etc. # wait for the app container to delete .app_is_ready and perform rsync, etc.
sleep 30 sleep 30
if ! id app; then
addgroup -g $OWNER_GID app addgroup -g $OWNER_GID app
adduser -D -h /var/www/html -G app -u $OWNER_UID app adduser -D -h /var/www/html -G app -u $OWNER_UID app
fi
while ! pg_isready -h $DB_HOST -U $DB_USER; do while ! pg_isready -h $DB_HOST -U $DB_USER; do
echo waiting until $DB_HOST is ready... echo waiting until $DB_HOST is ready...