From 739132267aa114ab649a29b46f1476b722ec121e Mon Sep 17 00:00:00 2001 From: miaaurl Date: Thu, 11 Jun 2026 17:10:16 +0700 Subject: [PATCH] Add Dockerfile to projects --- jalan_tanah/Dockerfile | 18 ++++++++++++++++++ poverty-map/Dockerfile | 24 ++++++++++++++++++++++++ spbu_layer/Dockerfile | 18 ++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 jalan_tanah/Dockerfile create mode 100644 poverty-map/Dockerfile create mode 100644 spbu_layer/Dockerfile diff --git a/jalan_tanah/Dockerfile b/jalan_tanah/Dockerfile new file mode 100644 index 0000000..82837b2 --- /dev/null +++ b/jalan_tanah/Dockerfile @@ -0,0 +1,18 @@ +# 1. Gunakan base image resmi PHP yang sudah include Apache web server +FROM php:8.2-apache + +# 2. Instal ekstensi PHP mysqli +RUN docker-php-ext-install mysqli + +# 3. Aktifkan modul rewrite Apache +RUN a2enmod rewrite + +# 4. Salin seluruh isi folder projek ke dalam folder web Apache di server +COPY . /var/www/html/ + +# 5. Atur hak akses agar Apache bisa membaca dan menulis file (penting untuk upload foto) +RUN chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html + +# 6. Buka port 80 +EXPOSE 80 diff --git a/poverty-map/Dockerfile b/poverty-map/Dockerfile new file mode 100644 index 0000000..cbeb0fd --- /dev/null +++ b/poverty-map/Dockerfile @@ -0,0 +1,24 @@ +# 1. Gunakan base image resmi PHP yang sudah include Apache web server +FROM php:8.2-apache + +# 2. Instal library sistem yang dibutuhkan untuk ekstensi zip +RUN apt-get update && apt-get install -y \ + libzip-dev \ + zip \ + && rm -rf /var/lib/apt/lists/* + +# 3. Instal ekstensi PHP mysqli (untuk DB) dan zip (untuk SimpleXLSX) +RUN docker-php-ext-install mysqli zip + +# 4. Aktifkan modul rewrite Apache +RUN a2enmod rewrite + +# 5. Salin seluruh isi folder projek ke dalam folder web Apache di server +COPY . /var/www/html/ + +# 6. Atur hak akses agar Apache bisa membaca dan menulis file (untuk upload foto) +RUN chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html + +# 7. Buka port 80 +EXPOSE 80 diff --git a/spbu_layer/Dockerfile b/spbu_layer/Dockerfile new file mode 100644 index 0000000..b660c0f --- /dev/null +++ b/spbu_layer/Dockerfile @@ -0,0 +1,18 @@ +# 1. Gunakan base image resmi PHP yang sudah include Apache web server +FROM php:8.2-apache + +# 2. Instal ekstensi PHP mysqli +RUN docker-php-ext-install mysqli + +# 3. Aktifkan modul rewrite Apache +RUN a2enmod rewrite + +# 4. Salin seluruh isi folder projek ke dalam folder web Apache di server +COPY . /var/www/html/ + +# 5. Atur hak akses agar Apache bisa membaca dan menulis file +RUN chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html + +# 6. Buka port 80 +EXPOSE 80