Adding docker for deployment

This commit is contained in:
Araya's Project
2026-06-10 19:41:20 +07:00
parent 593a6e2487
commit 980017464b
6 changed files with 192 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
FROM php:8.2-apache
# Enable mod_rewrite for clean URLs and .htaccess support
RUN a2enmod rewrite
# Install PHP extensions needed: mysqli (sig-03), pdo + pdo_mysql (sig-01, sig-02)
RUN docker-php-ext-install mysqli pdo pdo_mysql
# Allow .htaccess overrides in /var/www/html
RUN sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
# Copy all project files into Apache web root
COPY . /var/www/html/
# Fix file permissions
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html