Last active
March 31, 2022 12:34
-
-
Save supercid/e3a3b60b959da9efb66ffb1733ea5a23 to your computer and use it in GitHub Desktop.
Shopware Local Install Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/Sites | |
composer create-project shopware/composer-project --no-interaction --stability=dev shopware | |
cd shopware | |
MYSQL_ENV_MYSQL_HOST='mysql' | |
# Setup variables to populate the .env file | |
cp .env.example .env | |
sed -i -e 's*DB_DATABASE=composer*DB_DATABASE=shopware*g' .env | |
sed -i -e 's*DB_USERNAME=root*DB_USERNAME=homestead*g' .env | |
sed -i -e 's*DB_PASSWORD=root*DB_PASSWORD=secret*g' .env | |
sed -i -e 's*DB_HOST=localhost*DB_HOST=192.168.15.10*g' .env | |
sed -i -e 's*SHOP_URL=https://composer.test/path*SHOP_URL=https://shopware.dev.nos.to*g' .env | |
sed -i -e 's*[email protected]*[email protected]*g' .env | |
sed -i -e 's*ADMIN_NAME="Demo User"*ADMIN_NAME="Nosto Admin"*g' .env | |
sed -i -e 's*ADMIN_USERNAME=demo*ADMIN_USERNAME=demo*g' .env | |
sed -i -e 's*ADMIN_PASSWORD=demo*ADMIN_PASSWORD=demo*g' .env | |
sed -i -e 's*IMPORT_DEMODATA=true*IMPORT_DEMODATA=y*g' .env | |
chmod +x ./app/install.sh | |
yes | ./app/install.sh -e | |
# Install Nosto from zipfile | |
# curl -s https://api.github.com/repos/nosto/nosto-shopware/releases/latest | jq -r '.assets[0].browser_download_url' | xargs wget | |
# NOSTO_TGZ=$(curl -s https://api.github.com/repos/nosto/nosto-shopware/releases/latest | jq -r '.assets[0].name') | |
# unzip "$NOSTO_TGZ" -d Plugins/Community/ | |
cd Plugins/Community/Frontend | |
git clone [email protected]:Nosto/nosto-shopware.git NostoTagging | |
cd NostoTagging | |
composer install --no-dev | |
echo "NOSTO_SERVER_URL=localhost:9000 | |
NOSTO_API_BASE_URL=http://localhost:9000/api | |
NOSTO_OAUTH_BASE_URL=http://localhost:9000/oauth | |
NOSTO_WEB_HOOK_BASE_URL=http://localhost:9000 | |
NOSTO_IFRAME_ORIGIN=https://localhost:9000 | |
NOSTO_IFRAME_ORIGIN_REGEXP=.* | |
" > vendor/nosto/php-sdk/src/.env | |
cd ~/Sites/shopware | |
bin/console sw:plugin:refresh | |
bin/console sw:plugin:install NostoTagging | |
clear | |
echo '*****Remember to Disable SSL Support*****' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment