Skip to content

Commit 50016be

Browse files
authored
Merge pull request #2 from andrzejenne/master
Add pre and post install scripts to magento-install command
2 parents 7813e3d + cf1c791 commit 50016be

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

bin/magento-install

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ while true; do
1414
esac
1515
done
1616

17+
# Run pre install script, if exists
18+
if [ -f "$APP_DIRECTORY/scripts/magento-pre-install" ]
19+
then
20+
$APP_DIRECTORY/scripts/magento-pre-install
21+
fi
22+
1723
# Install Magento
1824
docker-compose exec -T php-fpm /home/dockeruser/magento/bin/magento setup:install \
1925
--base-url=http://magento.local \
@@ -51,6 +57,13 @@ docker-compose exec -T php-fpm /home/dockeruser/magento/bin/magento setup:instal
5157
--amqp-virtualhost="/" \
5258
--cleanup-database
5359

60+
# Run post install script, if exists
61+
if [ -f "$APP_DIRECTORY/scripts/magento-post-install" ]
62+
then
63+
$APP_DIRECTORY/scripts/magento-post-install
64+
fi
65+
66+
5467
cd ${APP_DIRECTORY}
5568

5669
# Set developer mode
@@ -68,4 +81,4 @@ echo "Mailhog has been configured."
6881
${DOCKER_BIN_DIRECTORY}/magento config:set admin/security/use_form_key 0
6982
echo "Secret key in admin urls was disabled."
7083

71-
${DOCKER_BIN_DIRECTORY}/magento cache:flush
84+
${DOCKER_BIN_DIRECTORY}/magento cache:flush

0 commit comments

Comments
 (0)