Tambah Dockerfile untuk webgis poverty mapping
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
FROM php:8.3-apache
|
||||||
|
|
||||||
|
# Install ekstensi PHP yang dibutuhkan
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libpng-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
&& docker-php-ext-configure gd --with-jpeg --with-webp \
|
||||||
|
&& docker-php-ext-install pdo pdo_mysql gd \
|
||||||
|
&& 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 . .
|
||||||
|
|
||||||
|
# Buat folder upload dan beri permission
|
||||||
|
RUN mkdir -p assets/img/uploads \
|
||||||
|
&& chown -R www-data:www-data assets/img/uploads \
|
||||||
|
&& chmod -R 775 assets/img/uploads
|
||||||
|
|
||||||
|
# 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
|
||||||
Reference in New Issue
Block a user