Developer mode in docker isn't working?

Hello there,
First post here. After a few days learning, I want to test more things locally on my ubuntu desktop.
I successfully run the docker stack using pwd.yml.

On the frappe “New App”, I noticed “custom” checkbox was always ticked for new modules and apps, so I added to pwd.yml > configurator > command:
bench set-config -g developer_mode 1;
Once restarted, it does indeed add the setting to the common_site_config.json in the backend container:

{
 "db_host": "db",
 "db_port": 3306,
 "default_site": "frontend",
 "developer_mode": 1,
 "redis_cache": "redis://redis-cache:6379",
 "redis_queue": "redis://redis-queue:6379",
 "redis_socketio": "redis://redis-queue:6379",
 "socketio_port": 9001
}

(port 9000 was already taken locally, so I setup websocket on 9001, no error)

I restarted all containers, and refreshed the UI, but I still have the custom checkbox greyed:
image

And also in its settings:

As you can see, it states I’m in dev mode but custom is still greyed.
Did I miss something?

Thank you for your help :slight_smile:

Hi @frappefr:

Are you logged as ‘Administrator’ user? Not mean ‘System Manager’ role, I mean exactly ‘Administrator’ user …

2 Likes

Yes! I don’t know the difference :roll_eyes:

@avc my bad, after first login, it created another user and logged me in.
I thought it updated the Administrator user.

Hi @frappefr:

Yes, on site creation ‘Administrator’ user is generated. On first login, the framework as for creating another user with System Manager privileges. But … is not the same user.

Login as Administrator and it should work.

It works now! Thank you very much @avc
Does it mean we can only have one Administrator, and he’s also the only dev?

Hi @frappefr:

Actually, developers should have their local environment, packing changes into a custom app and update the server via git repository.

Developing directly on the server is not a good practice … Take care with editing existing doctypes, changes will be overwritten with app update …

Hope this helps.

I agree, I’m both learning about the dev local env and a future demo server :smile:

packing changes into a custom app

How to do this? I want to test the dev->prod pipeline before drilling into dev

Thank you again

HI @frappefr:

Read this docs …
https://frappeframework.com/docs/user/en/basics/apps

Custom app can contain python/.js code, doctypes, reports, workspaces, custom frontend … even other apps customizations (custom fields for ERPNext, etc …). Once you’ve created your app on your local dev environment can upload it to your git repository.

From server, just use bench get-app and bench update to install or update app.
Hope this helps.

1 Like

Thank you very much @avc for helping beyond the initial question.