diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec38e61 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM php:8.1-apache + +# 1. Install ekstensi PHP mysqli yang diperlukan untuk koneksi database +RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli + +# 2. Aktifkan modul rewrite Apache (jika diperlukan untuk routing/htaccess) +RUN a2enmod rewrite + +# 3. Salin semua file dari repositori Git ke dalam folder web server Apache +COPY . /var/www/html/ + +# 4. Atur hak akses folder agar bisa dibaca oleh web server +RUN chown -R www-data:www-data /var/www/html + +# 5. Buka port 80 untuk akses web +EXPOSE 80 \ No newline at end of file diff --git a/koneksi.php b/koneksi.php index 560360f..49cc8f5 100644 --- a/koneksi.php +++ b/koneksi.php @@ -1,6 +1,26 @@ + \ No newline at end of file