povertymap: add Dockerfile and update config
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
FROM php:8.2-apache
|
||||||
|
|
||||||
|
RUN docker-php-ext-install mysqli pdo pdo_mysql
|
||||||
|
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
COPY . /var/www/html/
|
||||||
|
|
||||||
|
RUN mkdir -p /var/www/html/uploads \
|
||||||
|
&& chown -R www-data:www-data /var/www/html/uploads \
|
||||||
|
&& chmod -R 775 /var/www/html/uploads
|
||||||
|
|
||||||
|
RUN echo '<Directory /var/www/html>\n\
|
||||||
|
Options Indexes FollowSymLinks\n\
|
||||||
|
AllowOverride All\n\
|
||||||
|
Require all granted\n\
|
||||||
|
</Directory>' > /etc/apache2/conf-available/custom.conf \
|
||||||
|
&& a2enconf custom
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
// ── Konfigurasi Database ──────────────────────
|
// ── Konfigurasi Database ──────────────────────
|
||||||
// Sesuaikan dengan pengaturan XAMPP Anda
|
// Sesuaikan dengan pengaturan XAMPP Anda
|
||||||
define('DB_HOST', 'localhost');
|
define('DB_HOST', getenv('DB_HOST') ?: 'localhost');
|
||||||
define('DB_USER', 'root'); // default XAMPP
|
define('DB_USER', getenv('DB_USER') ?: 'root');
|
||||||
define('DB_PASS', ''); // default XAMPP (kosong)
|
define('DB_PASS', getenv('DB_PASS') ?: '');
|
||||||
define('DB_NAME', 'webgis_poverty_mapping');
|
define('DB_NAME', getenv('DB_NAME') ?: 'webgis_poverty_mapping');
|
||||||
define('DB_CHARSET', 'utf8mb4');
|
define('DB_CHARSET', 'utf8mb4');
|
||||||
|
|
||||||
// ── Upload Config ─────────────────────────────
|
// ── Upload Config ─────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user