Frappe_docker `Local deployment for testing` - fail to create new site

I have

  1. pulled the frappe_docker repository
  2. added the ~/installation/sites/ folder and
  3. copied the environment-example file to ~/installation/.env (for my test installation I only add a valid site name (mysite3.local) and change the VERSION variable to VERSION=version-12 on that `.env. file).

no I try to set up a Local deployment for testing with basically these 3 steps

1. starting services

docker-compose \
  --project-name v12 \
  -f installation/docker-compose-common.yml \
  -f installation/docker-compose-erpnext.yml \
  --project-directory installation \
  up -d

2. Publish Port

docker-compose \
  --project-name v12 \
  -f installation/docker-compose-common.yml \
  -f installation/docker-compose-erpnext.yml \
  --project-directory installation \ 
  run --publish 80:80 -d erpnext-nginx

3. Create ERPNext site

from within the frappe_docker folder

docker exec -it \
    -e "SITE_NAME=$SITE_NAME" \
    -e "DB_ROOT_USER=$DB_ROOT_USER" \
    -e "MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD" \
    -e "ADMIN_PASSWORD=$ADMIN_PASSWORD" \
    -e "INSTALL_APPS=erpnext" \
    -e "FORCE=1" \
    v12_erpnext-python_1 docker-entrypoint.sh new

step 1 & 2 go through but Creating a new site fails with

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/commands/new.py", line 81, in <module>
    main()
  File "/home/frappe/frappe-bench/commands/new.py", line 47, in main
    reinstall=False,
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 67, in _new_site
    make_site_dirs()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 267, in make_site_dirs
    os.makedirs(dir_path)
  File "/opt/bitnami/python/lib/python3.7/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/bitnami/python/lib/python3.7/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: './private'

I have tried to find a file or folder name private and looked at the docker.entrypoint.sh but could not draw any insights from both.

can someone point me to where I could proceed troubleshooting this issue?

try pulling the latest v12 images. I just pulled latest v12 and it worked without error.

not needed anymore - Use Docker volumes for storing sites by tbolender · Pull Request #195 · frappe/frappe_docker · GitHub

this will be changed - docker-compose commands · Issue #213 · frappe/frappe_docker · GitHub

if bench new-site test.local --install-app erpnext fails at a certain version then ERPNext new site creation will fail in docker - Error: `ValidationError Item Group is an invalid Data field` on `new` command. · Issue #203 · frappe/frappe_docker · GitHub

Important

  • use specific versions instead of major. e.g. v12.7.1 instead of v12
  • semver bump may need to run migration. Running migration is manual process.
  • If v12 is used and migration doesn’t run. Database won’t get patched.
  • docker-compose given in frappe_docker README is very simple example. Check wiki, issues for better docker-compose/stack.yaml
  • docker devops basics necessary