services: create-site: image: frappe/erpnext:v15.54.4 entrypoint: - bash - -c command: - > wait-for-it -t 120 db:3306; wait-for-it -t 120 redis-cache:6379; wait-for-it -t 120 redis-queue:6379; export start=`date +%s`; until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \ [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \ [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]]; do echo "Waiting for sites/common_site_config.json to be created"; sleep 5; if (( `date +%s`-start > 120 )); then echo "could not find sites/common_site_config.json with required keys"; exit 1 fi done; echo "sites/common_site_config.json found"; rm -rf sites/erpnext.appsatile.com; mysql -h db -uroot -p123 -e "DROP DATABASE IF EXISTS _1a2a97c0df78d27f"; bench new-site --mariadb-root-username=root --db-root-password=123 --admin-password=admin123 --db-host=db --mariadb-user-host-login-scope=% --install-app erpnext erpnext.appsatile.com; volumes: - sites:/home/frappe/frappe-bench/sites