change software architecture
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 "$@"
|
||||
Reference in New Issue
Block a user