Skip to content

Commit

Permalink
Update apache-server image to use php 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Elanis committed May 5, 2024
1 parent ef24818 commit cf099d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions apache-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ RUN sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /
RUN apt-get update

# Apache2 server / PHP
RUN apt install -y apache2 php8.1-fpm php8.1-pgsql
RUN apt install -y apache2 php8.3-fpm php8.3-pgsql

# Apache modules
RUN a2enmod proxy_fcgi setenvif rewrite
RUN a2enconf php8.1-fpm
RUN a2enconf php8.3-fpm

COPY ./apache-server/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./apache-server/security.conf /etc/apache2/conf-available/security.conf
COPY ./apache-server/start.sh /start.sh

RUN chown -R www-data:www-data /var/www/

RUN sed -i s/\;clear_env\ \=\ no/clear_env\ \=\ no/ /etc/php/8.1/fpm/pool.d/www.conf
RUN sed -i s/\;clear_env\ \=\ no/clear_env\ \=\ no/ /etc/php/8.3/fpm/pool.d/www.conf

RUN apt-get install -y curl
HEALTHCHECK --interval=5m --timeout=3s CMD service apache2 status && service php8.1-fpm status && curl -f http://localhost/ || exit 1
HEALTHCHECK --interval=5m --timeout=3s CMD service apache2 status && service php8.3-fpm status && curl -f http://localhost/ || exit 1

CMD ["bash","/start.sh"];
2 changes: 1 addition & 1 deletion apache-server/start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

service apache2 start
service php8.1-fpm start
service php8.3-fpm start

tail -F /var/www/logs/error.log

0 comments on commit cf099d5

Please sign in to comment.