Skip to content
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

Errors in .env #1416

Closed
1 task
i5hi opened this issue Jan 16, 2023 · 3 comments
Closed
1 task

Errors in .env #1416

i5hi opened this issue Jan 16, 2023 · 3 comments

Comments

@i5hi
Copy link

i5hi commented Jan 16, 2023

Issue: Easy Install

Do the checklist before filing an issue:

  • [ x ] Did you retain the logfile (path of logfile is shared while the script is run)? We definitely need the logfile to debug any easy install related issues.
  • Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome

Distro Information (Required)

Linux erp 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux

ID="generic"
VERSION="20220503-998"
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Command Run (Required)

python3 easy-install.py --prod -s erp.toma.tech -n toma --email [email protected] -p

Log File (Required)

debian@erp:~$ cat easy-install.log 
2023-01-16 05:59:07,390 - INFO - Running Production Setup

Additional context

debian@erp:~$ python3 easy-install.py --prod -s erp.toma.tech -n toma --email [email protected] -p
 
Setting Up Production Instance
 
 Docker is not installed, Installing Docker... 
 Waiting Docker to start 
 
Please refer to .example.env file in the frappe_docker folder to know which keys to set

 
Traceback (most recent call last):
  File "/home/debian/easy-install.py", line 320, in <module>
    setup_prod(args.project, args.sitename, args.email)
  File "/home/debian/easy-install.py", line 223, in setup_prod
    setup_prod(project, sitename, email)  # Recursive
  File "/home/debian/easy-install.py", line 125, in setup_prod
    write_to_env(docker_repo_path, sitename, db_pass, admin_pass, email)
  File "/home/debian/easy-install.py", line 80, in write_to_env
    f"FRAPPE_VERSION={example_env['FRAPPE_VERSION']}\n",  # Defaults to latest version of Frappe
KeyError: 'FRAPPE_VERSION'

The script references a file .example.env that does not exist.

I noticed this key is not present in example.env either (it was recently removed from the frappe-docker repo)

When I manually add in:

FRAPPE_VERSION=v14.22.1

I now get another missing env error:

Traceback (most recent call last):
  File "/home/debian/easy-install.py", line 320, in <module>
    setup_prod(args.project, args.sitename, args.email)
  File "/home/debian/easy-install.py", line 135, in setup_prod
    admin_pass = env["SITE_ADMIN_PASS"]
KeyError: 'SITE_ADMIN_PASS'

Possible Solution

Seems like the missing FRAPPE_VERSION caused the setup to create an empty .env; so after manually adding it to the example.env a new .env is not created rather the old empty env is attempting to be read.

I deleted the old .env and added FRAPPE_VERSION - and successive install now creates a proper .env but breaks failing to create a compose file as follows:


stat /home/debian/frappe_docker/overrides/compose.erpnext.yaml: no such file or directory
 
Generating Compose File failed


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

Looks like frappe-docker/overrides/compose.erpnext.yaml is missing.

@athul
Copy link
Contributor

athul commented Jan 16, 2023

Hi, this was caused due to frappe/frappe_docker#1032

We will send a patch to fix this :)

@i5hi
Copy link
Author

i5hi commented Jan 16, 2023

Thanks @athul

@iamshouvikmitra
Copy link

iamshouvikmitra commented Jan 16, 2023

Stuck while installing :( , when can we expect this to be resolved?

Also, any workarounds in case this would take time to get patched?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants