3rd commit: persiapan deploy

This commit is contained in:
2026-06-12 16:41:29 +07:00
parent 4fe88f3b2e
commit c456f1b61f
3 changed files with 1791 additions and 4 deletions
+18
View File
@@ -0,0 +1,18 @@
# Menggunakan image resmi PHP dengan Apache
FROM php:8.2-apache
# Install ekstensi database (PDO MySQL & MySQLi)
RUN docker-php-ext-install pdo pdo_mysql mysqli
# Mengaktifkan mod_rewrite Apache
RUN a2enmod rewrite
# Menyalin seluruh file proyek ke dalam folder publik web server container
COPY . /var/www/html/
# Memberikan hak akses standar web server
RUN chown -R www-data:www-data /var/www/html/ \
&& chmod -R 755 /var/www/html/
# Mengekspos port 80 untuk lalu lintas web HTTP
EXPOSE 80
+1769
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -1,10 +1,10 @@
<?php
// koneksi.php (Terpusat untuk semua versi)
$host = 'localhost';
$user = 'root';
$pass = ''; // Kosongkan jika menggunakan XAMPP default
$db = 'webgis_pontianak'; // Database bersama
$host = getenv('DB_HOST') ?: 'localhost';
$user = getenv('DB_USER') ?: 'root';
$pass = getenv('DB_PASS') ?: '';
$db = getenv('DB_NAME') ?: 'webgis_pontianak';
try {
// Membangun koneksi PDO