Introduction: Simple ERPNext Docker Setup
Hey everyone. Today I want to show you how to set up ERPNext—your ERPNext with Docker. And the reason why I'm doing this is because of course, I am one person that believes in simplicity. And since this thing has been done already for us, we don't need to keep re-engineering stuff. So I want to show you how easy it is to set up ERPNext with Docker without overengineering anything.
So on this blog post, I have given a detailed step-by-step guide and we are actually going to be following it through to set up our ERPNext instance with Docker. So as you can see, there are just three steps. The first step is basically to access your ERPNext. So it's just going to localhost port 8080 and there you go, your ERPNext is running there. There are additional operations that are the things that you may need. So it's not something that you must do for you to run ERPNext.
Preparing a Clean Docker Environment
So, let me go ahead and start this. So, I'm going to go into my terminal and because I want everything to be new, I'm going to be removing all the containers that I have in my system currently. So, if I do docker images, even the images actually, I'm going to be removing all the images. Let me just apply a sudo here. Yes, of course, I'll give my password. And you can see that I have three images running here currently. So I want to go ahead and delete those. So if I do also sudo docker ps, you'll notice that there are no containers that are running currently.
So here on the blog post down here on the additional operations, there is one operation that you will see that says that it deletes all the containers. It's supposed to be volumes, images actually. So I'm going to be editing that after this. So if I go here and paste this here, it's basically going to delete all my containers. So if you try to run that again, you see it tells you that there is nothing to be cleared. And now if you do sudo docker images, you notice that there is not a single image into our system. So we have a clean system to start with together and we go through the journey.
Step 1: Create the Project Directory
So how do I start this thing? Let's go back to the blog post. So here the first thing that you're supposed to do is of course to make a directory called erpnext-docker. You don't have to call it this. You can give it whichever name you want to give your directory. So the first thing I'm going to do here is to navigate to... by the way, probably you can just do side by side here so that I don't have to keep navigating so much.
Ah, there you go. And then this other thing. There you go. And then maybe I need more of this because of the font size so that you can see. So I will first of all change my directory to desktop, then builds, and then docker. I have a file here called docker. And if you check inside I have three other folders. Don't worry about those. We just ignore those. And this is where I'm going to be creating my other directory. And you don't have to do this. You can just place your directory wherever you want to place it. So let me copy this command and bring it here. And that is what creates my directory. If you get a permission denied error, you can just add sudo before this mkdir and you'll be good to go. Step one is done. It's as simple as that.
Step two is creating a docker-compose file and then copying some content and saving inside. So follow me through and I'll show you how to do this. Copy this. There's something we didn't do. We created that, we didn't change the directory. So again, let me copy this and get into my directory. Then I'll copy this and put it here. Alright. This is going to open a nano editor. There you go. So once we are there, the other thing is paste the docker-compose configuration. Copy the and paste the configuration file that is here into the docker-compose.
So if I click on this link, it's going to download the docker-compose. Open it. Maybe you can open it with your favorite editor. And here what I'm supposed to do is just to copy the contents of this thing as is and put it into my yaml file that we have opened here. But there is something I want to show you. In the event that you want to change the name of your site, you can change it here and here. And that is it. So here that is on line 70 and on line 102 you change it here. So let me go ahead and actually show you that. So I can see this is site.local. Maybe sample.site. Let me do sample.site. Again remember this is just a name. So you can call it however you want to call it. So that is the only thing I did. I just changed the name of my site, the site that's going to be created. So I'm going to copy this now and I'll bring it here and I'll paste it into the file that we opened.
And then if we go back to here, the other thing is going to tell us what to save and exit. So save the changes with Ctrl + O. So here Ctrl and O and then accept the prompt. So accepting the prompt, this is the prompt that I am talking about. So I just need to click on enter. And then the next thing is telling us what? And exit the text editor with Ctrl and X. So again here Ctrl and X and we are out of that nano editor.
Step 3: Starting the ERPNext Docker Containers
And then the next thing is basically to start ERPNext containers and this one is just copying this command and pasting it here. Now something that you need to note, if you change the name of your docker-compose file to something else, then you need to remember to change it here. So you give here the name of your docker-compose file. Then you click on enter and your file should be running.
But if you remember when we were starting, we were putting sudo here. So you can see this is talking about permission denied, ideally because sometimes you need to run docker commands with sudo. But if you don't want to keep doing this all the time, you can add a docker user inside the sudo list and you don't have to do that. So in this event, let us just add sudo here and then click on enter again and you notice that something is going on. So what's happening here is that Docker is creating the relevant containers and then it's going to go ahead and do installations. And then after that the only other thing that we are going to do is basically access ERPNext.
Monitoring the Installation Process
So there isn't anything that you're going to be needing to do there. So that is how simple it is guys and I would like us to actually wait because you can see here on the blog post I've even given you the instructions on how you are going to log in. So basically logging in is basically providing the username which is administrator and the password is admin. These are defaults that are in the file that I showed you. But again remember you can change those in this file but again I don't want to over-engineer stuff in this video. I just want you to keep this thing as simple as I really wished that it remains.
So ladies and gentlemen, let us give this process that is taking place here a little bit of time and then we are going to see how it is going to be. I am going to keep it running. I am not going to be stopping or anything. It will be running there as you watch it. And then of course when it's done we are going to again together go ahead and access the ERPNext instance.
Accessing the ERPNext Login Page
So as you can see now it's started to install Frappe. So kind of the configurations are almost done. So it was it will go ahead now and install Frappe, then install ERPNext, and then we can go ahead and test the system. Let's give it a couple more minutes and then we'll be ready to go.
So as you can see, this is now telling us that this has exited. So I'm just going to go ahead and start try to access that now. And the system tells us to do what? It tells us to simply go to localhost and then colon and 8080. Let's try and see whether we have something there. And voila, here you go. You have your next instance.
Completing the ERPNext Setup Wizard
Again, the default password, I mean username is administrator. I hope I wrote it right and the password is admin. So if we go ahead and click on login and if anything... I think I... let me just copy this because I don't know whether I'm writing it properly. So let me copy this thing and put it here. And I don't think I can miss the spelling of the word admin. So there you go ladies and gentlemen we are in. And you can see now here we can go ahead and set up our wizard.
So just go ahead and provide your username. My name is Karani Joffrey and my email is... let me actually give... yeah, yeah, let me use this one actually. And then my password. And yeah, we can click on next. I don't need to save that. The company is SuperHSoft Limited. And now I can go and click on finish the setup. So when that is running, you'll notice that stuff... there are stuff that are happening here. So maybe I could have also kept this side-by-side still. So that's okay. You'll see that as this is happening, something is happening on our dockerized container here. Or rather our dockerized application here. Let me just put this one here so that we don't have to have issues. So give it again like 1 minute at most. Yeah. Actually, I didn't even finish seeing that before it finished. So you saw as this was loading, something happened here. Actually just check when I refresh, this is happening here. So that is to tell you that this is actually the application we just installed.
Verifying the Installation and What's Next
And if you come here you notice that we have accounting, we have buying and selling. So we have your app next installed. And if you go to help and click on about you notice that we have those two applications installed there.
So ladies and gentlemen, that is how we install ERPNext using Docker on Linux. And that's not only Linux, even on other OS like Windows and Mac. The only thing you need to do is basically how to run different commands and probably here instead of using the terminal, probably on Windows you use PowerShell and of course the Mac has a terminal as well.
So thank you so much for this video. In the next video, I'm going to show you again on a simplified way how to install a custom app using Docker. See you there.