Files
sidak/README_DOCKER.md
wartana 05dd3f2a67 Enhance SIDAK with two-way KK-KTP linkage, scanner mobile optimization, NIK validation, and UI improvements
- 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
2026-01-22 07:34:17 +08:00

1.9 KiB

SIDAK Application with Docker

Prerequisites

  • Docker
  • Docker Compose

Quick Start

  1. Start the application:

    docker-compose up -d
    
  2. Access the application:

  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:

    docker-compose down
    
  5. Stop and remove volumes (clears all data):

    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