change software architecture

This commit is contained in:
2026-01-27 14:33:04 +01:00
parent a14ca16f18
commit 14e8aa80a9
8 changed files with 39 additions and 116 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ RUN mkdir -p /backups
RUN mkdir -p /etc/periodic/15min
COPY backup/backup_db.sh /etc/periodic/15min/backup_db
COPY backup/entrypoint2.sh /entrypoint.sh
COPY backup/entrypoint.sh /entrypoint.sh
RUN chmod +x /etc/periodic/15min/backup_db
RUN chmod +x /entrypoint.sh
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -e
APP_DIR=/var/www/app
if [ ! -d "$APP_DIR/.git" ]; then
git clone -b "${GIT_BRANCH:-main}" "$GIT_REPO" "$APP_DIR"
else
cd "$APP_DIR"
git pull origin "${GIT_BRANCH:-main}"
fi
cd "$APP_DIR"
if [ -f composer.json ]; then
composer install --no-interaction --prefer-dist --optimize-autoloader
fi
if [ -d storage ] && [ -d bootstrap/cache ]; then
chown -R www-data:www-data storage bootstrap/cache
fi
exec "$@"