Tambah Dockerfile untuk webgis SPBU Pontianak

This commit is contained in:
L4zyL4mb
2026-06-11 16:35:16 +07:00
parent 5c57c73b26
commit 950d5e89e8
+30
View File
@@ -0,0 +1,30 @@
FROM php:8.3-apache
# Install ekstensi PHP yang dibutuhkan
RUN apt-get update && apt-get install -y \
zip \
unzip \
&& docker-php-ext-install pdo pdo_mysql \
&& rm -rf /var/lib/apt/lists/*
# Aktifkan mod_rewrite Apache
RUN a2enmod rewrite
# Set direktori kerja
WORKDIR /var/www/html
# Copy semua file proyek
COPY . .
# Permission
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# Konfigurasi Apache agar baca .htaccess
RUN echo '<Directory /var/www/html>\n\
AllowOverride All\n\
Require all granted\n\
</Directory>' > /etc/apache2/conf-available/custom.conf \
&& a2enconf custom
EXPOSE 80