Adding the Account module to the alexjunk/emoncms Docker container

I am using the latest Emoncms docker container built by alexjunk.

I have a need for multiple user accounts and groups and came across the Account module.

I have tried the typical method for adding modules which involves placing the Git code in /opt/emoncms/modules then doing a Database update. The Database update makes no changes and the module doesn’t get picked up.

Is it possible to add this module to this docker container?

Regards

Paul

I have been able to resolve my question.

I discovered there was an issue with the /opt/openenergymonitor/Emonscripts/update/service-runner-update.sh script.

At line 25 it uses the df command with an option (–output=avail) that is not supported by the version of df in the Docker container (BusyBox). So the script fails.

My understanding is this is why the the Update Database button action on the Admin/Update page didn’t think there any changes that were required.

The simple change to the script replaces line 25 as follows:

Original: varlog_available=$(df --output=avail /var/log | tail -n 1)

New: varlog_available=$(df /var/log | awk ‘{print $4}’ | tail -n 1)

At the same time I deleted the contents of /var/log/emoncms/update.log.

When I logged in to Emoncms again and clicked on the Admin/Update Update Database button, the script completed successfully and found there were database changes that were required and proceeded to do them.

The Accounts menu item then showed up.

Regards

Paul