Laravel + Inertia.js + React application for managing housing and settlement data.
- PHP:
^8.3 - Composer:
>= 2.5 - Node.js:
>= 20 - npm:
>= 9 - Docker (for production deployment)
PHP Extensions: pdo_sqlite, mbstring, gd, zip, bcmath, openssl, fileinfo, curl
composer install
npm installcp .env.example .env
php artisan key:generate
touch database/database.sqlitephp artisan migrate:fresh --seedcomposer run devThis starts both the Laravel backend and Vite frontend.
# PHP formatting
vendor/bin/pint
# Frontend linting & formatting
npm run lint
npm run format
# Type checking
npm run types
# Run tests
vendor/bin/pestdocker build -t sikawan:latest .docker run -d \
-p 8080:80 \
-v $(pwd)/data/database.sqlite:/var/www/html/database/database.sqlite \
-v $(pwd)/data/storage:/var/www/html/storage \
-e APP_KEY=your-app-key \
-e APP_ENV=production \
sikawan:latestDeployment is automated via GitHub Actions on push to main branch.
| Secret | Description |
|---|---|
VPS_HOST |
VPS IP address |
VPS_USERNAME |
SSH username |
VPS_SSH_KEY |
Private SSH key for authentication |
APP_KEY |
Laravel application key |
GITHUB_TOKEN |
Auto-provided for container registry |
- Test: Runs PHP and JS tests
- Build: Creates Docker image and pushes to
ghcr.io - Deploy: SSH to VPS and updates the container
/opt/sikawan/
├── docker-compose.yml # Generated by deploy action
└── data/
├── database.sqlite # Persistent database
└── storage/ # Persistent storage files
# SSH to VPS
ssh root@your-vps-ip
# Navigate to app directory
cd /opt/sikawan
# View logs
docker logs sikawan-app
# Restart container
docker compose restart
# Pull latest and redeploy
docker compose pull
docker compose up -d
# Reset database seeding only (run seeders again on next restart)
docker exec sikawan-app rm /var/www/html/storage/.seeded
docker compose restart
# ⚠️ FULL RESET (deletes database and storage, fresh start)
# NOTE: Must delete from HOST, not inside container (volume is busy)
docker compose down
rm -f data/database.sqlite
rm -rf data/storage
touch data/database.sqlite
docker compose up -d
# Reset superadmin password without full reset
docker exec -it sikawan-app php artisan tinker --execute="
\$user = \App\Models\User::where('email', 'superadmin@sihuma.muaraenim.site')->first();
if (\$user) { \$user->password = bcrypt('Password123!'); \$user->save(); echo 'Password reset!'; }
"-
Install Docker:
curl -fsSL https://get.docker.com | sh -
Create app directory:
mkdir -p /opt/sikawan/data touch /opt/sikawan/data/database.sqlite
-
Trigger GitHub Actions deploy or manually run:
cd /opt/sikawan docker compose pull docker compose up -d
After first deployment, a superadmin user is created:
- Email:
superadmin@sihuma.muaraenim.site - Password:
Password123!
⚠️ Change these credentials immediately after first login!
| Variable | Description | Default |
|---|---|---|
APP_NAME |
Application name | SIHUMA |
APP_ENV |
Environment | production |
APP_DEBUG |
Debug mode | false |
APP_KEY |
Encryption key | (required) |
APP_URL |
Application URL | https://sihuma.muaraenim.site |
DB_CONNECTION |
Database driver | sqlite |
DB_DATABASE |
Database path | /var/www/html/database/database.sqlite |
QUEUE_CONNECTION |
Queue driver | database |
RESET_APP |
Set to true for full reset on startup |
false |
© 2025 Dinas Perumahan Rakyat dan Kawasan Permukiman serta Petanahan Kabupaten Muara Enim