forked from duhon/magento-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reinstall
executable file
·56 lines (40 loc) · 1.66 KB
/
reinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
set -ex
source ./.env
export $(cut -s -d= -f1 ./.env)
DOCKER_PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $MAGENTO_PATH/magento2ce
if [ ${MUTAGEN_INSTALLATION} == "YES" ] && [[ -d .git ]]; then
git clean -df -e '.idea' -e 'vendor' -e 'magento2*'
git reset --hard
git apply $DOCKER_PROJECT_DIR/etc/php/path-validator.patch
fi
cd $DOCKER_PROJECT_DIR
# reinstall storefront application bases on the current code base
# monolith installation
docker-compose exec app magento reinstall_storefront ${INSTALLED_REPOS}
#standalone installations
if [[ $INSTALLED_REPOS == *"storefront-message-broker"* ]]; then
docker-compose exec app-message-broker magento reinstall_message_broker
fi
if [[ $INSTALLED_REPOS == *"catalog-storefront"* ]]; then
docker-compose exec app-catalog-storefront magento reinstall_catalog_storefront
fi
if [[ $INSTALLED_REPOS == *"storefront-product-reviews"* ]]; then
docker-compose exec app-product-reviews magento reinstall_storefront_review
fi
if [[ $INSTALLED_REPOS == *"storefront-pricing-ce"* ]]; then
docker-compose exec app-pricing magento reinstall_storefront_pricing
fi
if [[ $INSTALLED_REPOS == *"storefront-search-ce"* ]]; then
docker-compose exec app-search magento reinstall_storefront_search
fi
docker-compose exec app magento config_setup
# docker-compose exec app magento profile_generate
# docker-compose exec app magento reindex
docker-compose exec app magento storefront
docker-compose stop redis
echo y | docker-compose rm redis
docker-compose up -d redis
# start gRPC server on standalone application
docker-compose exec app-catalog-storefront magento grpc