Trying to automate ERPNext and Education with docker-compose

Hello there,

So I have been struggling for at least one month, trying to find a solution to make it possible to run a app of ERPNext and Education together with docker-compose, I have tried some ways, but none of them seems to work. I’m going out of attempts, and maybe it is a easy thing for some of you.

Could someone please help me, giving some advice or path that I should follow?

I managed to make it work using docker, to build an image of frappe/bench, than installing ERPnext and Education step by step manually when I’m into the container, but when I try to automate that using a Dockerfile, I don’t find a way to make it work.

Is it possibel to do What I’m trying to do, or Am I going crazy?

Production setup:

Development setup:

1 Like

Hmm, I’ve seen those articles you sent me before too, Tried these steps, but I Couldn’t make it work as well.

But i’m still trying to find a way to make it happen.

Now i’m trying to work with, so I can install everything I need inside the container, if it works, I’ll let you know.

BTW, Thanks for the links <3

In case of development setup there is thats another script to init bench, apps, site with one unattended command.

I tried using this, but I might have used it mistakenly.

Would you have any tips on how to properly use the

Education is now another app. So you need to build a custom image for production which includes the app before the containers are even started from docker compose. It’s unclear in your response before if you built a custom image. It reads like you tried to enter one of the containers afterwards to install the app manually, which will not work.


Yeah, that’s pretty much it, I enter the container afterwards and then I install it all manually, which works.

But I can’t find a way to dockerize this installation, like I’m trying to find a way to install it all automated, from frappe-bench, until the creation of the site, installing ERPNext then Education.

For production, you need to build the image with education “baked in”. That’s the process covered in revant_one’s first link. Include the education app’s info in apps.json, then run docker build/ buildah build. That’s the equivalent of the “bench get-app” process you would do in a typical manual install. After you’ve built your images, you can reference the images in your docker-compose.yml. When you have started your docker project, you will create your site and install the apps into the site.

If you want to automate the site creation and installing the apps to the site, you can take a look at the example pwd.yml from the repo and copy-paste the create-site service from there into your docker-compose.yml, then just customize the “bench new-site” command with your own site name and apps to install.

To go even further, you could change the site name and apps to variables and put the variables in .env or a custom.env.

1 Like

Great, thanks a lot mate!

I was reading this pwd.yml yesterday, before I see your message here, and I was trying to figure the logic, and how I can make it work.

That will help me a lot, thanks trustedcomputer!