- Implement bidirectional KK-KTP linkage system (address-based & NIK-based) - Optimize scanner for mobile devices (touch slop, larger hit areas, modal locking) - Add NIK validation (16-digit numeric) with client-side feedback - Set default RT/RW values to '000' for both KK and KTP forms - Change 'Kpl Keluarga' label to 'Kepala Keluarga' - Improve scanner error messages and user feedback - Remove redundant 'Deteksi Dokumen' button - Add database schema updates and Docker support files
74 lines
1.9 KiB
Markdown
74 lines
1.9 KiB
Markdown
# SIDAK Application with Docker
|
|
|
|
## Prerequisites
|
|
- Docker
|
|
- Docker Compose
|
|
|
|
## Quick Start
|
|
|
|
1. **Start the application:**
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
2. **Access the application:**
|
|
- Web application: http://localhost:8500
|
|
- phpMyAdmin: http://localhost:8080
|
|
- MySQL/MariaDB: localhost:3306
|
|
|
|
3. **Default credentials:**
|
|
- **Application:**
|
|
- Admin: `admin` / `admin`
|
|
- Kaur: `kaur` / `kaur`
|
|
- **Database:**
|
|
- Host: `db`
|
|
- Database: `data_penduduk`
|
|
- User: `sidak_user`
|
|
- Password: `sidak_pass`
|
|
- Root password: `rootpassword`
|
|
|
|
4. **Stop the application:**
|
|
```bash
|
|
docker-compose down
|
|
```
|
|
|
|
5. **Stop and remove volumes (clears all data):**
|
|
```bash
|
|
docker-compose down -v
|
|
```
|
|
|
|
## Services
|
|
|
|
1. **web** - PHP Apache application
|
|
- Port: 8500
|
|
- Directory mounted: `/var/www/html`
|
|
- Environment variables: DB_HOST, DB_USER, DB_PASS, DB_NAME
|
|
|
|
2. **db** - MariaDB database
|
|
- Port: 3306
|
|
- Database: `data_penduduk`
|
|
- Auto-initialized with schema and sample data
|
|
- Data persisted in volume: `mariadb-data`
|
|
|
|
3. **phpmyadmin** - Database management
|
|
- Port: 8080
|
|
- Connect to host: `db`
|
|
|
|
## Development
|
|
|
|
- **Hot reload:** Changes to PHP files are reflected immediately due to volume mounting
|
|
- **Database persistence:** Data is preserved between container restarts
|
|
- **Build custom image:** `docker-compose build`
|
|
|
|
## Troubleshooting
|
|
|
|
1. **Port conflicts:** Check if ports 8500, 8080, or 3306 are already in use
|
|
2. **Database connection issues:** Wait a few seconds for database to initialize
|
|
3. **View logs:** `docker-compose logs -f`
|
|
4. **Reset database:** `docker-compose down -v && docker-compose up -d`
|
|
|
|
## File Structure
|
|
- `docker-compose.yml` - Service definitions
|
|
- `Dockerfile` - PHP Apache image configuration
|
|
- `init.sql` - Database initialization script
|
|
- `.dockerignore` - Files to exclude from build context |