fix: simplify Dockerfile and rely on standard apache start to avoid bad gateway
This commit is contained in:
+2
-8
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user