chore: switch to Dockerfile and Apache to resolve Nixpacks Nginx 502 Bad Gateway
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM php:8.3-apache
|
||||
|
||||
# Copy the application files to the Apache web root
|
||||
COPY . /var/www/html/
|
||||
|
||||
# Ensure proper permissions
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
# Replace the default Apache port (80) with the dynamic PORT environment variable provided by Railway, then start Apache
|
||||
CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && apache2-foreground
|
||||
Reference in New Issue
Block a user