Installing the Docker image on a local machine without Letsencrypt so we can access it with http://localhost

Hello

Is it possible to install the Docker image on a standalone machine without https?

I don’t have much experience when it comes to Docker. I want to install ERPNext on a local machine so that a single clerk can use it for accounting etc. There’s no need for https or networking. All I want is an isolated machine with ERPNext on it.

I’ve read the documentation on the Docker install pages https://github.com/frappe/frappe_docker https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md
https://github.com/frappe/frappe_docker/blob/main/docs/setup-options.md

The below steps are from the instructions on docker localhost

I’ve scripted the steps so I can replay and post my steps here:

sudo apt install docker docker-compose git
docker version #20.10.7
docker-compose version #2.2.2
git version #2.25.1

I then prepare the directory:

sProj=erp2
sDir=/home/ep/docker/${sProj}/
mkdir --parents ${sDir}
cd ${sDir}

I then pull the git repo

git clone https://github.com/frappe/frappe_docker
cd frappe_docker
cp example.env .env

I then edit the .env file. Note that I do not delimit the values in backticks. Also ‘erp2’ is the literal value of ${sProj}.

FRAPPE_SITE_NAME_HEADER=erp2.localhost

I then build the ${sProj}-docker-compose.yml file in ${sDir}

docker-compose -f compose.yaml -f overrides/compose.erpnext.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.redis.yaml -f overrides/compose.noproxy.yaml config > ${sProj}-docker-compose.yml

I then start the container using the above yml

docker-compose --project-name ${sProj} -f ${sProj}-docker-compose.yml up -d

Once successful, I then check the log

docker logs ${sProj}-frontend-1 -f

I then create a site

docker-compose --project-name ${sProj} exec backend bench new-site ${sProj}.localhost --mariadb-root-password 123 --admin-password pw01

Finally I try to access the app

 chromium ${sProj}.localhost

Screenshot%20from%202022-03-24%2009-05-15

2 Likes

can you try to reach http://erp2.localhost:8080

If compose.noproxy.yaml is used in overrides then it will publish port 8080

You can change it to any port you wish. Port 8080 is used because some systems only allow root user to publish ports less than 1000.

1 Like

Ah, as always @revant_one, you come to the rescue!

chromium http://${sProj}.localhost:8080

Thanks so much for all your contributions, big and small, they make such a difference to our experience with ERPNext. :+1:

1 Like

Once I log on as Administrator, I notice that none of the ERPNext modules are present, only the Frappe Core modules.

Surely the ERPNext app is installed when I add the following override to the docker-compose.

-f overrides/compose.erpnext.yaml

How do I now activate the ERPNext modules?

I tried to install ERPNext again but it says I cannot install it once the Wizard has run.

docker-compose --project-name ${sProj} exec backend bench --site ${sProj}.localhost install-app erpnext

So it must be present but just not showing?

at this point where you created the site you need to add --install-app erpnext.

or install ERPNext first thing before running wizard.

1 Like

Thanks for taking the effort to format and document the post so well! This kind of community etiquette is rare. Such posts motivate to answer. The logs are shared even before asking. The first post clears everything, second post answers! Saves everyone’s time. Future readers will be happy. Community will benefit.

Rare to find this behaviour. Such posts keep the community forum worth the search.

2 Likes