frappe / bench

CLI to manage Multi-tenant deployments for Frappe apps
https://frappeframework.com/docs/user/en/bench
GNU General Public License v3.0
1.38k stars 1.2k forks source link

Generating Compose File Failed #1430

Open Kartoffelbreili opened 1 year ago

Kartoffelbreili commented 1 year ago

Issue: Easy Install

Do the checklist before filing an issue:

Distro Information (Required) Ubuntu 22.04.1 LTS <!-- Paste the contents of

  1. Linux aceraspire 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  2. -->DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS" PRETTY_NAME="Ubuntu 22.04.1 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.1 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

Command Run (Required) python3 easy-install.py --prod --email your@email.tld

Log File (Required)

File "/home/[redacted]/easy-install.py", line 146, in setup_prod subprocess.run( File "/usr/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/bin/docker', 'compose', '--project-name', 'frappe', '-f', 'compose.yaml', '-f', 'overrides/compose.mariadb.yaml', '-f', 'overrides/compose.redis.yaml', '-f', 'overrides/compose.https.yaml', '--env-file', '.env', 'config']' returned non-zero exit status 15. And heres what the terminal threw: Setting Up Production Instance Please refer to .example.env file in the frappe_docker folder to know which keys to set invalid interpolation format for services.frontend.labels.[]. You may need to escape any $ with another $. required variable SITES is missing a value: List of sites not set Generating Compose File failed **Screenshots**

Additional context

Pulled newest easy-install.py. I did try with docker preinstalled and also let the script install docker. Both hat the same outcome. **Possible Solution** Maybe typo. Or changes in docker.
revant commented 1 year ago

can you test the script from this pr

https://github.com/frappe/bench/pull/1424

Kartoffelbreili commented 1 year ago

That one works. But now i am hitting a 404 error when trying to open the page. Also tried setting the current site to site1.localhost again but to no avail. Seems to be traefik related: Neues Textdokument (5).txt

revant commented 1 year ago

frappe-proxy-1 | time="2023-02-08T15:15:56Z" level=error msg="Unable to obtain ACME certificate for domains \"site1.localhost\": unable to generate a certificate for the domains [site1.localhost]: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for \"site1.localhost\": Domain name does not end with a valid public suffix (TLD)" providerName=main-resolver.acme routerName=frontend-http@docker rule="Host(site1.localhost)"

localhost domains will not work for traefik.

make sure the site exists in sites directory.

Kartoffelbreili commented 1 year ago

when that error comes up those directories dont exist in docker. It is a fresh install. what would i have to enter in the script to make it work?

OsricDhoubhadel commented 1 year ago

Confirming that I get the same error from subprocess.py when using the command from README.

Command used: $ wget https://raw.githubusercontent.com/frappe/bench/develop/easy-install.py $ python3 easy-install.py --prod --email your@email.tld

Error received: File "/usr/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/bin/docker', 'compose', '--project-name', 'frappe', '-f', 'compose.yaml', '-f', 'overrides/compose.mariadb.yaml', '-f', 'overrides/compose.redis.yaml', '-f', 'overrides/compose.https.yaml', '--env-file', '.env', 'config']' returned non-zero exit status 15.

Which wget command should we use to test pr#1424?

Henry-Do-Su commented 1 year ago

I also have the same problem with a fresh server install

Hel5ing commented 1 year ago

same problem

agiient commented 1 year ago

I get the same error, on every method to install:

[easy-install.log]

2023-02-20 17:30:49,912 - INFO - Running Production Setup 2023-02-20 17:30:50,591 - INFO - Downloaded frappe_docker zip file from GitHub 2023-02-20 17:30:50,608 - INFO - Unzipped and Renamed frappe_docker 2023-02-20 17:30:50,608 - INFO - Removed the downloaded zip file 2023-02-20 17:30:50,698 - ERROR - Docker Compose generation failed Traceback (most recent call last): File "/home/adrian/projects/easy-install.py", line 146, in setup_prod subprocess.run( File "/usr/lib64/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/bin/docker', 'compose', '--project-name', 'frappe', '-f', 'compose.ya

[terminal output]

[adrian@hqmain projects]$ wget https://raw.githubusercontent.com/frappe/bench/develop/easy-install.py --2023-02-20 17:30:43-- https://raw.githubusercontent.com/frappe/bench/develop/easy-install.py Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.111.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 9144 (8.9K) [text/plain] Saving to: ‘easy-install.py’

easy-install.py 100%[==============================================>] 8.93K --.-KB/s in 0.001s

2023-02-20 17:30:43 (6.80 MB/s) - ‘easy-install.py’ saved [9144/9144]

[adrian@hqmain projects]$ python3 easy-install.py --prod --email admin@pisys.us

Setting Up Production Instance

Please refer to .example.env file in the frappe_docker folder to know which keys to set

A .env file is generated with basic configs. Please edit it to fit to your needs

invalid interpolation format for services.frontend.labels.[]. You may need to escape any $ with another $. required variable SITES is missing a value: List of sites not set

Generating Compose File failed

sodhancha commented 5 months ago

Generating Compose File failed

2024-05-19 13:42:51,493 - INFO - Running Production Setup 2024-05-19 13:42:51,502 - ERROR - Docker Compose generation failed Traceback (most recent call last): File "/Users/Documents/www/erpnext/easy-install.py", line 150, in setup_prod subprocess.run( File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/opt/homebrew/bin/docker', 'compose', '--project-name', 'frappe', '-f', 'compose.yaml', '-f', 'overrides/compose.mariadb.yaml', '-f', 'overrides/compose.redis.yaml', '-f', 'overrides/compose.https.yaml', '--env-file', '.env', 'config']' returned non-zero exit status 125.