updated docker information

This commit is contained in:
Codex Agent
2025-11-15 11:40:11 +01:00
parent 5ef5894680
commit a931cf8aa8
9 changed files with 210 additions and 3 deletions

33
docker/app/entrypoint.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
APP_SOURCE=${APP_SOURCE:-/opt/app}
APP_TARGET=${APP_TARGET:-/var/www/html}
APP_USER=${APP_USER:-www-data}
APP_GROUP=${APP_GROUP:-www-data}
mkdir -p "${APP_TARGET}"
# Sync the built application from the immutable image into the shared app volume
# while preserving runtime data that lives under storage/.
rsync -a --delete \
--exclude storage \
--exclude public/storage \
--exclude bootstrap/cache \
--exclude .env \
"${APP_SOURCE}/" "${APP_TARGET}/"
cd "${APP_TARGET}"
mkdir -p storage/framework/{cache,sessions,testing,views} storage/logs bootstrap/cache
chown -R "${APP_USER}:${APP_GROUP}" storage bootstrap/cache || true
find storage -type d -exec chmod 775 {} \;
find storage -type f -exec chmod 664 {} \;
chmod -R ug+rwx bootstrap/cache
php artisan config:cache --quiet || true
php artisan route:cache --quiet || true
php artisan event:cache --quiet || true
exec "$@"