Squashed commit message
Some checks are pending
Telegram Mini App Shop Builder / Compute version metadata (push) Waiting to run
Telegram Mini App Shop Builder / Run Frontend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run Backend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Waiting to run
Telegram Mini App Shop Builder / Build module. (push) Blocked by required conditions
Telegram Mini App Shop Builder / release (push) Blocked by required conditions

This commit is contained in:
2026-03-11 22:08:41 +03:00
commit 3cc82e45f0
585 changed files with 65605 additions and 0 deletions

42
scripts/install_ocstore.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# The script install acmeShop.
# Should be executed from the project root folder.
echo "Setup acmeShop..."
set -e
docker compose down -v && docker compose up -d web mysql --remove-orphans
bash ./scripts/wait_for_containers.sh
bash ./scripts/wait_for_mysql.sh
echo "Install composer dependencies..."
docker compose exec web bash -c "cd /web; composer update"
docker compose exec web bash -c '\
cd /web/upload/install; \
php cli_install.php install \
--db_hostname mysql \
--db_username root \
--db_password secret \
--db_database acmeshop3 \
--db_driver mysqli \
--db_port 3306 \
--username admin \
--password admin \
--email youremail@example.com \
--http_server https://api.example.com/; exit $?'
docker compose exec web bash -c "cd /web; composer update"
echo "Moving storage folder outside the system."
mv src/upload/system/storage src/
docker compose exec web bash -c "\
sed -i \"s/DIR_SYSTEM \. 'storage\/'/'\/web\/storage\/'/g\" /web/upload/config.php
sed -i \"s/DIR_SYSTEM \. 'storage\/'/'\/web\/storage\/'/g\" /web/upload/admin/config.php"
rm -rf src/upload/install
echo "AcmeShop successfully installed."