feat(deploy): configure deployment for ClinicPro on Liara PHP platform

This commit is contained in:
hamed
2026-06-29 16:11:54 +03:30
parent efee966efb
commit b4273cfa8b
11 changed files with 683 additions and 83 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Liara PHP platform pre-build hook — runs BEFORE composer install (no env access).
# Symfony's Dotenv::bootEnv() hard-requires a .env file to exist, and composer's
# auto-scripts (cache:clear) run during install. The real .env is excluded from the
# upload (.liaraignore) to avoid leaking dev secrets, so write a minimal prod one if
# absent. Real values come from Liara's env vars; Dotenv never overwrites a set var.
set -e
if [ ! -f .env ]; then
printf 'APP_ENV=prod\nAPP_DEBUG=0\n' > .env
echo "pre-build: wrote minimal prod .env"
fi