Create Dockerfile for PHP Apache setup

This commit is contained in:
Ahyan Z 2026-06-24 21:39:56 +01:00 committed by GitHub
parent b5252b6ebe
commit acef01bedb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

14
Dockerfile Normal file
View file

@ -0,0 +1,14 @@
# 1. Use the official PHP image bundled with the Apache web server
FROM php:8.2-apache
# 2. Install the MySQL Data Objects (PDO) extensions required for your DB queries
RUN docker-php-ext-install pdo pdo_mysql
# 3. Enable Apache's mod_rewrite engine so your .htaccess file handles the API routing rules
RUN a2enmod rewrite
# 4. Copy all your backend files from GitHub straight into the web server's public root
COPY . /var/www/html/
# 5. Expose port 80 so Render can route incoming mobile app traffic to Apache
EXPOSE 80