diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3ef8c2f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,13 @@ +.git +.gitignore +.codex +.agents +*.rar +*.zip +*.7z +*.tar +*.gz +node_modules +vendor +*.log +Thumbs.db diff --git a/Dockerfile b/Dockerfile index d1094da..de4dea0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM php:8.2-apache RUN docker-php-ext-install mysqli pdo pdo_mysql \ - && a2enmod rewrite + && a2enmod rewrite \ + && echo "ServerName localhost" >> /etc/apache2/apache2.conf COPY . /var/www/html/ @@ -12,3 +13,5 @@ RUN mkdir -p \ /var/www/html/webgis-v3/uploads/bukti_bantuan \ /var/www/html/webgis-v3/uploads/foto_laporan \ && chown -R www-data:www-data /var/www/html + +EXPOSE 80 diff --git a/webgis-v3/Dockerfile b/webgis-v3/Dockerfile new file mode 100644 index 0000000..24d76e8 --- /dev/null +++ b/webgis-v3/Dockerfile @@ -0,0 +1,14 @@ +FROM php:8.2-apache + +RUN docker-php-ext-install mysqli pdo pdo_mysql \ + && a2enmod rewrite \ + && echo "ServerName localhost" >> /etc/apache2/apache2.conf + +COPY . /var/www/html/ + +RUN mkdir -p \ + /var/www/html/uploads/bukti_bantuan \ + /var/www/html/uploads/foto_laporan \ + && chown -R www-data:www-data /var/www/html + +EXPOSE 80 diff --git a/webgis01/Dockerfile b/webgis01/Dockerfile new file mode 100644 index 0000000..fe2871a --- /dev/null +++ b/webgis01/Dockerfile @@ -0,0 +1,11 @@ +FROM php:8.2-apache + +RUN docker-php-ext-install mysqli pdo pdo_mysql \ + && a2enmod rewrite \ + && echo "ServerName localhost" >> /etc/apache2/apache2.conf + +COPY . /var/www/html/ + +RUN chown -R www-data:www-data /var/www/html + +EXPOSE 80 diff --git a/webgis01/koneksi.php b/webgis01/koneksi.php index 27cdeff..1bdcf95 100644 --- a/webgis01/koneksi.php +++ b/webgis01/koneksi.php @@ -1,13 +1,36 @@ > /etc/apache2/apache2.conf + +COPY . /var/www/html/ + +RUN mkdir -p \ + /var/www/html/uploads/jalan \ + /var/www/html/uploads/parsil \ + /var/www/html/uploads/jalan_rusak \ + && chown -R www-data:www-data /var/www/html + +EXPOSE 80 diff --git a/webgis02/config.php b/webgis02/config.php index 52a3eee..f84b314 100644 --- a/webgis02/config.php +++ b/webgis02/config.php @@ -1,15 +1,38 @@ 'error', - 'message' => 'Koneksi database gagal: ' . mysqli_connect_error() + 'message' => "Koneksi database gagal. Pastikan MySQL service berjalan, environment DB_HOST/DB_USER/DB_PASSWORD benar, dan database '$db' sudah diimport. Error: " . mysqli_connect_error() ])); } diff --git a/webgis03/Dockerfile b/webgis03/Dockerfile new file mode 100644 index 0000000..fe2871a --- /dev/null +++ b/webgis03/Dockerfile @@ -0,0 +1,11 @@ +FROM php:8.2-apache + +RUN docker-php-ext-install mysqli pdo pdo_mysql \ + && a2enmod rewrite \ + && echo "ServerName localhost" >> /etc/apache2/apache2.conf + +COPY . /var/www/html/ + +RUN chown -R www-data:www-data /var/www/html + +EXPOSE 80 diff --git a/webgis04/Dockerfile b/webgis04/Dockerfile new file mode 100644 index 0000000..fe2871a --- /dev/null +++ b/webgis04/Dockerfile @@ -0,0 +1,11 @@ +FROM php:8.2-apache + +RUN docker-php-ext-install mysqli pdo pdo_mysql \ + && a2enmod rewrite \ + && echo "ServerName localhost" >> /etc/apache2/apache2.conf + +COPY . /var/www/html/ + +RUN chown -R www-data:www-data /var/www/html + +EXPOSE 80 diff --git a/webgis04/koneksi.php b/webgis04/koneksi.php index 27cdeff..1bdcf95 100644 --- a/webgis04/koneksi.php +++ b/webgis04/koneksi.php @@ -1,13 +1,36 @@