add Dockerfiles and update all configs for deployment
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
COPY . /var/www/html/
|
||||
|
||||
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
|
||||
+4
-5
@@ -2,11 +2,10 @@
|
||||
// ============================================
|
||||
// config.php — Konfigurasi Database SPBU
|
||||
// ============================================
|
||||
|
||||
define('DB_HOST', 'localhost');
|
||||
define('DB_USER', 'root'); // Ganti jika perlu
|
||||
define('DB_PASS', ''); // Ganti jika perlu
|
||||
define('DB_NAME', 'webgis_spbu');
|
||||
define('DB_HOST', getenv('DB_HOST') ?: 'localhost');
|
||||
define('DB_USER', getenv('DB_USER') ?: 'root');
|
||||
define('DB_PASS', getenv('DB_PASS') ?: '');
|
||||
define('DB_NAME', getenv('DB_NAME') ?: 'webgis_spbu');
|
||||
|
||||
function getConnection() {
|
||||
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
|
||||
|
||||
Reference in New Issue
Block a user