crm/scripts/init.sh
jingrow cd44b52409
Some checks failed
Build Container Image / Build (amd64) (push) Has been cancelled
Build Container Image / Build (arm64) (push) Has been cancelled
Generate Semantic Release / Release (push) Has been cancelled
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Has been cancelled
初始提交
2025-10-24 00:34:32 +08:00

47 lines
1011 B
Bash

#!bin/bash
set -e
if [[ -f "/workspaces/jingrow_codespace/jingrow-bench/apps/jingrow" ]]
then
echo "Bench already exists, skipping init"
exit 0
fi
rm -rf /workspaces/jingrow_codespace/.git
source /home/jingrow/.nvm/nvm.sh
nvm alias default 18
nvm use 18
echo "nvm use 18" >> ~/.bashrc
cd /workspace
bench init \
--ignore-exist \
--skip-redis-config-generation \
jingrow-bench
cd jingrow-bench
# Use containers instead of localhost
bench set-mariadb-host mariadb
bench set-redis-cache-host redis://redis-cache:6379
bench set-redis-queue-host redis://redis-queue:6379
bench set-redis-socketio-host redis://redis-socketio:6379
# Remove redis from Procfile
sed -i '/redis/d' ./Procfile
bench new-site dev.localhost \
--mariadb-root-password 123 \
--admin-password admin \
--no-mariadb-socket
bench --site dev.localhost set-config developer_mode 1
bench --site dev.localhost clear-cache
bench use dev.localhost
bench get-app crm
bench --site dev.localhost install-app crm