Files
sidak/Dockerfile
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

38 lines
1.2 KiB
Docker

FROM php:8.2-apache
# Install necessary PHP extensions and tools
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
zip \
unzip \
curl \
git \
mariadb-client \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install mysqli pdo pdo_mysql zip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Enable Apache rewrite module
RUN a2enmod rewrite
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html/
# Set proper permissions
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# Update koneksi.php to use environment variables
RUN sed -i 's/\$koneksi = new mysqli ("localhost","sidak_user","sidak_pass","data_penduduk");/\$db_host = getenv("DB_HOST") ?: "localhost";\n\$db_user = getenv("DB_USER") ?: "sidak_user";\n\$db_pass = getenv("DB_PASS") ?: "sidak_pass";\n\$db_name = getenv("DB_NAME") ?: "data_penduduk";\n\$koneksi = new mysqli (\$db_host,\$db_user,\$db_pass,\$db_name);/g' inc/koneksi.php
EXPOSE 80
CMD ["apache2-foreground"]