diff options
author | Andrew Dolgov <[email protected]> | 2023-10-22 09:40:08 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-22 09:40:08 +0300 |
commit | 028afdd7d59dcbf75521529ad33c0572fad4a58a (patch) | |
tree | 0e09b56782ccec292bc832ce6956fa7743dead9e /.docker/app | |
parent | 6b1b496248c581e4e319c81255fc9e4394a61fd1 (diff) |
add simple dev compose
Diffstat (limited to '.docker/app')
-rw-r--r-- | .docker/app/startup.sh | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/.docker/app/startup.sh b/.docker/app/startup.sh index 6d867af52..589125805 100644 --- a/.docker/app/startup.sh +++ b/.docker/app/startup.sh @@ -24,28 +24,32 @@ export PGPASSWORD=$TTRSS_DB_PASS [ ! -e /var/www/html/index.php ] && cp ${SCRIPT_ROOT}/index.php /var/www/html -if [ ! -d $DST_DIR ]; then - mkdir -p $DST_DIR - chown $OWNER_UID:$OWNER_GID $DST_DIR - - sudo -u app rsync -a \ - $SRC_DIR/ $DST_DIR/ +if [ -z $SKIP_RSYNC_ON_STARTUP ]; then + if [ ! -d $DST_DIR ]; then + mkdir -p $DST_DIR + chown $OWNER_UID:$OWNER_GID $DST_DIR + + sudo -u app rsync -a \ + $SRC_DIR/ $DST_DIR/ + else + chown -R $OWNER_UID:$OWNER_GID $DST_DIR + + sudo -u app rsync -a --delete \ + --exclude /cache \ + --exclude /lock \ + --exclude /feed-icons \ + --exclude /plugins/af_comics/filters.local \ + --exclude /plugins.local \ + --exclude /templates.local \ + --exclude /themes.local \ + $SRC_DIR/ $DST_DIR/ + + sudo -u app rsync -a --delete \ + $SRC_DIR/plugins.local/nginx_xaccel \ + $DST_DIR/plugins.local/nginx_xaccel + fi else - chown -R $OWNER_UID:$OWNER_GID $DST_DIR - - sudo -u app rsync -a --delete \ - --exclude /cache \ - --exclude /lock \ - --exclude /feed-icons \ - --exclude /plugins/af_comics/filters.local \ - --exclude /plugins.local \ - --exclude /templates.local \ - --exclude /themes.local \ - $SRC_DIR/ $DST_DIR/ - - sudo -u app rsync -a --delete \ - $SRC_DIR/plugins.local/nginx_xaccel \ - $DST_DIR/plugins.local/nginx_xaccel + echo "warning: working copy in $DST_DIR won't be updated, make sure you know what you're doing." fi for d in cache lock feed-icons plugins.local themes.local; do |