feat: adapt project structure for external hosting

This commit is contained in:
cygouw
2026-06-13 15:35:27 +07:00
parent 7b0ff984c7
commit bcb6e1dce2
7 changed files with 1192 additions and 6 deletions
+19 -2
View File
@@ -1,5 +1,22 @@
FROM nginx:alpine
FROM php:8.2-apache
COPY index.html /usr/share/nginx/html/index.html
# Install PHP extensions & enable Apache modules
RUN docker-php-ext-install mysqli pdo pdo_mysql \
&& a2enmod rewrite headers
# Allow .htaccess overrides and enable rewrite for all directories
RUN sed -i 's|AllowOverride None|AllowOverride All|g' /etc/apache2/apache2.conf \
&& echo "ServerName localhost" >> /etc/apache2/apache2.conf
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html/
# Set proper permissions for web server
RUN chown -R www-data:www-data /var/www/html \
&& find /var/www/html -type d -exec chmod 755 {} \; \
&& find /var/www/html -type f -exec chmod 644 {} \;
EXPOSE 80