Files

21 lines
620 B
Docker

FROM php:8.2-apache
# 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
# Ubah port Apache ke 3000 (agar sesuai dengan default Coolify)
RUN sed -i 's/80/3000/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
# Copy semua file project
COPY . /var/www/html/
# Update permissions
RUN chown -R www-data:www-data /var/www/html
# Expose port Apache
EXPOSE 3000