Best practice for dev team setup for developing a custom app?

I’m curious about the development process, especially in a team environment or when working on custom app development across multiple computers.

When I work on an app and push it to the repo, then I build a custom Frappe Docker image with the app pulled from the repo, everything works as expected in a production environment.

However, when I pull this app, for further coding, to a different computer (or a different VS Code dev container), it treats this app as a production app. If I want to add or edit any doctype, I have to customize it.

Is there any way to turn any new environment into a new dev environment? Or can anyone suggest the best practices in the development process, especially in a team setup?

I tried bench migrate but it was not working. Is there any concern to keep in mind regarding FQDN vs the .localhost domain name in sites folder?

Thank you

1 Like

Did you set developer_mode to 1 in common_site_config.json or site_config.json?

developer_mode should only be turned on with devcontainer setup or local bench setup. Do not turn it on in production setup.

If you’ve set of apps,

  • use ssh bind mount for keys, in devcontainer
  • wget your apps.json from some location
  • use

Above steps will get your apps in a bench, set developer mode and create a site with all apps installed.


Thank you so much. I’ve the dev mode turned on but let me try what you recommended. Will report back.

I’ve been having an issue on mac vscode devcontainer for several days since this post.

Everything’s working fine except ‘bench new-app <app_name>’ command.

This is the error I got: OSError: [Errno 13] Permission denied: '/workspace/development/frappe-bench/apps/parking/.git/logs/refs/heads/main.lock'

Things I’ve tried:

  • I tried to pass user flag (user: UID:GID) in docker-compose but still the same error.
  • I also tested git init, git clone, chmod, chown, it was all working. But when bench new-app, got the same permission error.

Do you or anyone have the same problem before?

I use Linux. Try changing ownership of bind mount to 1000:1000 uid:gid

I went ahead and created a brand new user. Now it’s working. I’m thinking the problem might be that I have several Github profiles installed. Thanks.

1 Like