#!/bin/sh # Copy the code baked into the image into the web root volume, then start Apache. # pass 1: update code; runtime folders (uploads, generated images, caches, downloaded # translations, config/settings.inc.php) are skipped # pass 2: add any file that is still missing (first start, new defaults), never overwrite set -e SRC=/opt/qloapps-src/ DST=/var/www/html/ echo "server-entrypoint: updating code in $DST" rsync -a --chown=www-data:www-data \ --exclude='/.git' --exclude='/.env' --exclude='/.htaccess' \ --exclude='/config/settings.inc.php' --exclude='/config/xml/' \ --exclude='/img/' --exclude='/upload/' --exclude='/download/' \ --exclude='/cache/' --exclude='/log/' --exclude='/translations/' --exclude='/mails/' \ --exclude='/modules/*/translations/' --exclude='/modules/*/views/img/' --exclude='/modules/*/logs/' \ --exclude='/themes/*/lang/' --exclude='/themes/*/cache/' --exclude='/themes/*/modules/*/translations/' \ "$SRC" "$DST" echo "server-entrypoint: adding missing files" rsync -a --ignore-existing --chown=www-data:www-data \ --exclude='/.git' --exclude='/.env' --exclude='/config/settings.inc.php' \ "$SRC" "$DST" exec docker-php-entrypoint "$@"