Add Docker-based dev/prod setup with zail helper scripts

This commit is contained in:
zino
2025-11-19 16:03:36 +01:00
parent 28647fce70
commit 5ef73a8041
10 changed files with 479 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env sh
set -e
APP_DIR=/var/www
if [ -n "${UID}" ] && [ -n "${GID}" ]; then
echo "Fixing file permissions with UID=${UID} and GID=${GID}..."
for path in storage bootstrap/cache; do
if [ -d "${APP_DIR}/${path}" ]; then
chown -R "${UID}:${GID}" "${APP_DIR}/${path}" || true
fi
done
fi
if [ -f "${APP_DIR}/artisan" ]; then
echo "Clearing configurations..."
php "${APP_DIR}/artisan" config:clear || true
php "${APP_DIR}/artisan" route:clear || true
php "${APP_DIR}/artisan" view:clear || true
fi
exec "$@"