mirror of
https://github.com/cloudmaker97/JTL-Shop-Entwicklungsumgebung.git
synced 2025-12-06 00:48:34 +00:00
Version 1.0.0 für die Entwicklungsumgebung
This commit is contained in:
parent
8a2ad27392
commit
926fa451be
3 changed files with 22 additions and 23 deletions
|
|
@ -3,7 +3,6 @@
|
||||||
"dockerFile": "Dockerfile",
|
"dockerFile": "Dockerfile",
|
||||||
"workspaceMount": "source=${localWorkspaceFolder}/.,target=/workspace,type=bind,consistency=cached",
|
"workspaceMount": "source=${localWorkspaceFolder}/.,target=/workspace,type=bind,consistency=cached",
|
||||||
"workspaceFolder": "/workspace",
|
"workspaceFolder": "/workspace",
|
||||||
"postStartCommand": "just install_url='CODESPACE'",
|
|
||||||
"mounts": [
|
"mounts": [
|
||||||
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached"
|
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
28
justfile
28
justfile
|
|
@ -4,7 +4,6 @@ install_demo := "true"
|
||||||
install_demo_products := "10"
|
install_demo_products := "10"
|
||||||
install_demo_categories := "3"
|
install_demo_categories := "3"
|
||||||
install_demo_manufacturers := "3"
|
install_demo_manufacturers := "3"
|
||||||
install_url := "https://jtl-shop-"+shop_version+".ddev.site"
|
|
||||||
|
|
||||||
# Installiert den Shop mit den angegebenen Werten
|
# Installiert den Shop mit den angegebenen Werten
|
||||||
[linux]
|
[linux]
|
||||||
|
|
@ -24,7 +23,7 @@ install:
|
||||||
@echo "Konfiguriere die Entwicklungsumgebung"
|
@echo "Konfiguriere die Entwicklungsumgebung"
|
||||||
just ddev-configuration
|
just ddev-configuration
|
||||||
@echo "Installiere den Shop automatisch und lösche das Installationsverzeichnis"
|
@echo "Installiere den Shop automatisch und lösche das Installationsverzeichnis"
|
||||||
just install_url="{{install_url}}" run-installer
|
just run-installer
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
[linux]
|
[linux]
|
||||||
|
|
@ -74,24 +73,14 @@ describe:
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
run-installer:
|
run-installer:
|
||||||
#!/usr/bin/env bash
|
@echo "\r\nInstalliere die Datenbank..."
|
||||||
set -euxo pipefail
|
@curl --silent -X POST -k -H 'Content-Type: application/x-www-form-urlencoded' -d 'admin[name]=admin&admin[pass]=admin&admin[locale]=de&wawi[name]=sync&wawi[pass]=sync&db[host]=db&db[pass]=db&db[socket]=&db[user]=db&db[name]=db&demoProducts={{install_demo_products}}&demoCategories={{install_demo_categories}}&demoManufacturers={{install_demo_manufacturers}}' https://jtl-shop-{{shop_version}}.ddev.site/install/install.php?task=doinstall
|
||||||
install_url_interpreted=""
|
@if [ {{install_demo}} = "true" ]; then \
|
||||||
if [ {{install_url}} = "CODESPACE" ]; then
|
curl --silent -X POST -k -H 'Content-Type: application/x-www-form-urlencoded' -d 'admin[name]=admin&admin[pass]=admin&admin[locale]=de&wawi[name]=sync&wawi[pass]=sync&db[host]=db&db[pass]=db&db[socket]=&db[user]=db&db[name]=db&demoProducts={{install_demo_products}}&demoCategories={{install_demo_categories}}&demoManufacturers={{install_demo_manufacturers}}' https://jtl-shop-{{shop_version}}.ddev.site/install/install.php?task=installdemodata; \
|
||||||
install_url_interpreted="https://"$(jq -r ".CODESPACE_NAME" /workspaces/.codespaces/shared/environment-variables.json)"-8080.app.github.dev"
|
|
||||||
else
|
|
||||||
install_url_interpreted={{install_url}}
|
|
||||||
fi
|
|
||||||
curl -X POST -k -H 'Content-Type: application/x-www-form-urlencoded' -d 'admin[name]=admin&admin[pass]=admin&admin[locale]=de&wawi[name]=sync&wawi[pass]=sync&db[host]=db&db[pass]=db&db[socket]=&db[user]=db&db[name]=db&demoProducts={{install_demo_products}}&demoCategories={{install_demo_categories}}&demoManufacturers={{install_demo_manufacturers}}' $install_url_interpreted/install/install.php?task=doinstall
|
|
||||||
if [ {{install_demo}} = "true" ]; then \
|
|
||||||
curl -X POST -k -H 'Content-Type: application/x-www-form-urlencoded' -d 'admin[name]=admin&admin[pass]=admin&admin[locale]=de&wawi[name]=sync&wawi[pass]=sync&db[host]=db&db[pass]=db&db[socket]=&db[user]=db&db[name]=db&demoProducts={{install_demo_products}}&demoCategories={{install_demo_categories}}&demoManufacturers={{install_demo_manufacturers}}' $install_url_interpreted/install/install.php?task=installdemodata; \
|
|
||||||
fi
|
|
||||||
if [ {{install_url}} = "CODESPACE" ]; then
|
|
||||||
file_path="path/to/your/file.php"
|
|
||||||
sed -i "s|define('URL_SHOP', 'https://localhost');|define('URL_SHOP', '$install_url_interpreted');|g" ./shop/includes/config.JTL-Shop.ini.php
|
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
echo "Erreichbar unter: "$install_url_interpreted
|
@echo "Installation erfolgreich abgeschlossen."
|
||||||
|
@echo "Erreichbar unter: https://jtl-shop-{{shop_version}}.ddev.site"
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
copy-installer:
|
copy-installer:
|
||||||
|
|
@ -101,7 +90,6 @@ copy-installer:
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
ddev-configuration:
|
ddev-configuration:
|
||||||
ddev config --php-version {{php_version}} --project-type php --docroot ./shop --project-name jtl-shop-{{shop_version}} --webserver-type apache-fpm
|
ddev config --php-version {{php_version}} --project-type php --docroot ./shop --project-name jtl-shop-{{shop_version}}
|
||||||
ddev config global --instrumentation-opt-in=false
|
|
||||||
ddev start
|
ddev start
|
||||||
ddev exec composer install --working-dir=./shop/includes
|
ddev exec composer install --working-dir=./shop/includes
|
||||||
|
|
@ -2,8 +2,20 @@
|
||||||
"folders": [
|
"folders": [
|
||||||
{
|
{
|
||||||
"path": ".",
|
"path": ".",
|
||||||
"name": "JTL-Shop: System zur Entwicklung"
|
"name": "Alle Ordner",
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"path": "shop",
|
||||||
|
"name": "JTL-Shop: Shop-System"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "tools",
|
||||||
|
"name": "Sonstiges: Tools"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".devcontainer",
|
||||||
|
"name": "Sonstiges: Devcontainer"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"settings": {}
|
"settings": {}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue