File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 8080 - name : Deploy containers
8181 run : |
8282 task drupal:getpull-image
83+ task drupal:getapacheconf
8384 task create:apps
8485 task drupal:deploy
8586 task drupal:waiting
Original file line number Diff line number Diff line change 33.env
44/install
55docker-compose- * .yml
6- ! docker-compose-lampy.yml
6+ ! docker-compose-lampy.yml
7+ /conf /apache2
Original file line number Diff line number Diff line change @@ -49,6 +49,19 @@ tasks:
4949 cmds :
5050 - task : default
5151
52+ drupal:getapacheconf :
53+ desc : " Récupère la configuration Apache depuis l'image Docker"
54+ silent : false
55+ cmds :
56+ - rm -rf ./conf/apache2 || true
57+ - docker create --name drupal-php koromerzhin/php:8.4.3-apache-symfony
58+ - docker cp drupal-php:/etc/apache2/ ./conf/apache2
59+ - docker rm -f drupal-php
60+
61+ - sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" ./conf/apache2/sites-available/*.conf
62+ - sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" ./conf/apache2/apache2.conf
63+ - sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" ./conf/apache2/conf-available/*
64+
5265 drupal:copysql :
5366 desc : " Copie le fichier SQL de dump dans le dossier drupal"
5467 silent : true
@@ -103,6 +116,7 @@ tasks:
103116 desc : " Exécute une commande dans un conteneur en cours d'exécution"
104117 cmds :
105118 - task : drupal:copysql
119+ - task : drupal:getapacheconf
106120 - task : drupal:getpull-image
107121 - task : drupal:deploy
108122 - task : drupal:waiting
Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ services:
1717 - redis
1818 volumes :
1919 - ${PWD}/apps:/var/www/:rw
20+ - ${PWD}/conf/apache2:/etc/apache2/
2021 - ${PWD}/conf/php.ini-development://usr/local/etc/php/conf.d/php.ini
21- environnement :
22- - APACHE_DOCUMENT_ROOT=/var/www/web
2322 networks :
2423 - net
2524 - serverlampy
You can’t perform that action at this time.
0 commit comments