-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent confirmation (-y) for bench install-app command #1560
Comments
What questions? I can't find any in If it was interactive https://frappecloud.com won't work too. It just issues simple https://github.com/frappe/agent/blob/2c926d8062d5867d8874f95e2f228f14974f8f4b/agent/site.py#L90-L93 |
I don't get exactly why you reference to frappecloud. The questions are like if I would like to override current installation. |
Here you can see how a
create-site:
image: frappe/erpnext:v15.25.0
deploy:
restart_policy:
condition: none
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
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";
bench new-site --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend || true;
bench get-app ecommerce_integrations --branch main;
bench --site frontend install-app ecommerce_integrations; |
Heyo sry, I am not kinda sure if that happened on the install or the get-app command and I also discovered that I would need to add bench --site frontend migrate; command to the pwd.yml file. Would be awesome if this could be mentioned in the custom apps installation guide, because this is at the moment not very intuitive. |
Issue: Feature Request
Is your feature request related to a problem? Please describe.
I'm always frustrated when I try to install ecommerce_integrations in the pwd.yml file of the frappe_docker repo and bench has no option for silent confirmation (-y) when I need to run these steps.
$ bench get-app ecommerce_integrations --branch main
$ bench --site sitename install-app ecommerce_integrations (Here, it is necessary to confirm manually multiple questions sometimes.)
Describe the solution you'd like
A parameter -y to confirm all questions which could appear on the bench install-app command
Describe alternatives you've considered
I tried out about 3 different variants to find a workaround, but gave up in the end.
I tried expect, yes | command and EOF, but it all didn't help me out.
The text was updated successfully, but these errors were encountered: