Create Dockerfile for PHP Apache setup
This commit is contained in:
parent
b5252b6ebe
commit
acef01bedb
1 changed files with 14 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal 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
|
||||||
Loading…
Add table
Reference in a new issue