fix: simplify Dockerfile and rely on standard apache start to avoid bad gateway

This commit is contained in:
2026-06-10 18:28:19 +07:00
parent c9aba353a3
commit f46d3c72ca
2 changed files with 2 additions and 48 deletions
+2 -8
View File
@@ -1,23 +1,17 @@
FROM php:8.2-apache
# Install mysql client dan ekstensi PHP
# Install ekstensi PHP yang dibutuhkan (termasuk PDO dan MySQLi)
RUN apt-get update && apt-get install -y default-mysql-client && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable mysqli
# Aktifkan mod_rewrite Apache
RUN a2enmod rewrite
# Copy semua file project ke dalam container
# Copy semua file project
COPY . /var/www/html/
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Update permissions
RUN chown -R www-data:www-data /var/www/html
# Expose port Apache
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]