# Matches the PHP version the project was developed against (XAMPP's 8.2). FROM php:8.2-apache # mysqli is what backend/config/database.php uses. RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli # .htaccess in backend/ sets CORS headers and denies .env, so both mod_rewrite # and mod_headers must be on, and .htaccess files must be honoured. RUN a2enmod rewrite headers RUN printf '\n\ Options -Indexes +FollowSymLinks\n\ AllowOverride All\n\ Require all granted\n\ \n' > /etc/apache2/conf-available/app-manager.conf \ && a2enconf app-manager # Stock PHP defaults cap uploads at 2M, well under a modern phone photo even # compressed -- PHP silently drops the file when it's exceeded rather than # raising an error, so a checklist task's photo requirement would fail with # a misleading "photo required" instead of an upload-too-large message. # 12M covers a compressed photo with headroom. RUN printf 'upload_max_filesize = 12M\n\ post_max_size = 13M\n' > /usr/local/etc/php/conf.d/uploads.ini # The Flutter app calls http://localhost:8888/manager/backend/..., so the # project has to live under a "manager" directory inside the web root. WORKDIR /var/www/html/manager