Deploy Laravel rebuild via Coolify

Point Docker and Coolify compose to the Laravel rebuild app so mahasiswa, dosen, and admin flows are served from the new Laravel public entrypoint.
This commit is contained in:
Power BI Dev
2026-05-03 18:50:29 +07:00
parent 89ce9d30a7
commit dab8ea396b
107 changed files with 17544 additions and 20 deletions

View File

@@ -0,0 +1,13 @@
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html/public
<Directory /var/www/html/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

View File

@@ -0,0 +1,56 @@
#!/usr/bin/env sh
set -e
cd /var/www/html
mkdir -p storage/app/files storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache public/build
if [ ! -f .env ]; then
cat > .env <<EOF
APP_NAME="SPOTA Rebuild"
APP_ENV=${APP_ENV:-production}
APP_KEY=${APP_KEY:-}
APP_DEBUG=${APP_DEBUG:-false}
APP_URL=${APP_URL:-http://localhost}
APP_LOCALE=id
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=id_ID
LOG_CHANNEL=stack
LOG_STACK=single
LOG_LEVEL=${LOG_LEVEL:-debug}
DB_CONNECTION=mysql
DB_HOST=${DB_HOST:-db}
DB_PORT=${DB_PORT:-3306}
DB_DATABASE=${DB_NAME:-spota_spotadb}
DB_USERNAME=${DB_USER:-spota_user}
DB_PASSWORD=${DB_PASSWORD:-spota_password}
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=${SESSION_DOMAIN:-}
CACHE_STORE=file
QUEUE_CONNECTION=sync
FILESYSTEM_DISK=local
VITE_APP_NAME="SPOTA Rebuild"
EOF
fi
if [ -z "$(grep '^APP_KEY=base64:' .env || true)" ]; then
php artisan key:generate --force
fi
php artisan optimize:clear || true
php artisan config:cache || true
php artisan route:cache || true
php artisan view:cache || true
chown -R www-data:www-data storage bootstrap/cache public/build 2>/dev/null || true
exec "$@"