mirror of
https://github.com/Ladebeze66/Inception.git
synced 2026-11-09 13:47:09 +01:00
final
This commit is contained in:
@@ -9,7 +9,7 @@ RUN apt update -y && apt upgrade -y && \
|
||||
rm /tmp/wordpress.tar.gz && \
|
||||
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar && mv wp-cli.phar /usr/local/bin/wp
|
||||
|
||||
RUN apt-get install sendmail -y
|
||||
#RUN apt-get install sendmail -y
|
||||
|
||||
# Copier les fichiers de configuration PHP et le script d'auto-configuration
|
||||
COPY ./conf/www.conf /etc/php/7.3/fpm/pool.d/
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
define('DB_NAME', 'wordpress');
|
||||
define('DB_USER', 'fgras');
|
||||
define('DB_PASSWORD', '1234');
|
||||
define('DB_NAME', getenv('MYSQL_DATABASE'));
|
||||
define('DB_USER', getenv('MYSQL_USER'));
|
||||
define('DB_PASSWORD', getenv('MYSQL_PASSWORD'));
|
||||
define('DB_HOST', 'mariadb');
|
||||
define('DB_CHARSET', 'utf8');
|
||||
define('URL', getenv('DOMAIN_NAME'));
|
||||
define('TITLE', getenv('WP_TITLE'));
|
||||
define('ADMIN_USER', getenv('WP_ADMIN_USR'));
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Démarrer PHP-FPM
|
||||
service php7.3-fpm start
|
||||
# Créer le répertoire pour le PID de PHP-FPM et définir les permissions
|
||||
mkdir -p /run/php
|
||||
chown www-data:www-data /run/php
|
||||
|
||||
# Assurez-vous que PHP-FPM est arrêté avant de le démarrer en mode non daemonisé
|
||||
service php7.3-fpm stop
|
||||
|
||||
# Attendre que MariaDB soit prêt
|
||||
until mysqladmin ping -h mariadb --silent; do
|
||||
echo "Waiting for MariaDB to be ready..."
|
||||
sleep 2
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# Télécharger WP-CLI si nécessaire
|
||||
@@ -33,5 +37,6 @@ else
|
||||
echo "=== WordPress is already installed ==="
|
||||
fi
|
||||
|
||||
# Garder le conteneur en cours d'exécution
|
||||
tail -f /dev/null
|
||||
# Démarrer PHP-FPM en mode non daemonisé
|
||||
php-fpm7.3 -F
|
||||
|
||||
|
||||
Reference in New Issue
Block a user