Local Docker Deployment

i think the volume is loaded properly

Sitename is erp.myweb.com. I also tried making entry in the /etc/hosts in the below fashion. Is it the correct way?

image

Note: I am working on windows system and running these command on git bash.

I have made the above entry in the etc/hosts for the sitename. But still not able to access it. It would be great if you could let me know the probable cause.

Since i could only post a single image in one comment… Here is my env-local screenshot

Please have a look and provide your input

I don’t have windows setup.

I think windows etc host is in system32/64 directory?

I have added the site name in etc/hosts, in my previous comment…but unfortunately i am still not able to access it. Could you suggest why it might be happening?

If you’re using windows I searched Google and found this gist:

I don’t know much about windows. I’ve not used docker on windows or Mac.

Use the above gist as reference. Read comments under the gist. I’ve not tried anything, I don’t have windows.

I have a remote Ubuntu server as well, if i follow the same steps on the server, will i be able to access it remotely though the site name or we will have to do some additional changes in order to access it remotely.

What I can think of:

  1. The server must have static IP
  2. The dns config for site must be set. E.g. if ip is 1.1.1.1 then A NAME must point to this ip and host set as the site domain name. erp.example.com -> 1.1.1.1
  3. Copy and use env-production instead of env-local, it has the needed traefik labels to use https in production.

Hope it works! Post here if something fails, I can help you on Linux more than any other os.

Also, if possible I’ll recommend using Docker swarm setup with portainer even in single server. It gives nice gui to control the server without connecting to ssh.
https://github.com/frappe/frappe_docker/blob/develop/docs/docker-swarm.md. Ignore this docker swarm if it’s too much for first time, explore it after you’re familiar with Docker.

1 Like

I am trying the below steps on my ubuntu server:

  1. git clone GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext
  2. cd frappe_docker
  3. cp env-production .env (with changes to sitenames)
  4. docker-compose --project-name erpnext up -d
  5. docker logs erpnext_site-creator_1 -f

Before following the steps I have update the /etc/hosts and env-production as below:


Unfortunately still not able to access the url https://erp.myweb.com from remote system.
Please let me know if i missed anything.

I don’t know, may be use correct LETSENCRYPT_EMAIL, I think @example.com is not allowed by letsencrypt to be used as email.

I just purchased DO droplet, set my DNS on godaddy, installed erpnext with above commands and everything worked for me.

I’m generally lucky with all types of installations, not just ERPNext.

1 Like

@revant_one

Hi! I am setting up frappe/erpnext on my windows home using docker.
I have everything setup according to the tutorial on official frapper docker repo on github.
I am getting the following error and couldn’t find any solution for it anywhere.
please help me

PS C:\WINDOWS\system32\frappe_docker> docker-compose --project-name laxmierp -f installation/docker-compose-common.yml -f installation/docker-compose-erpnext.yml -f installation/docker-compose-networks.yml --project-directory installation up -d
WARNING: The MYSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The ERPNEXT_VERSION variable is not set. Defaulting to a blank string.
WARNING: The SITES variable is not set. Defaulting to a blank string.
WARNING: The LETSENCRYPT_EMAIL variable is not set. Defaulting to a blank string.
WARNING: The MARIADB_HOST variable is not set. Defaulting to a blank string.
WARNING: The FRAPPE_VERSION variable is not set. Defaulting to a blank string.
ERROR: no such image: frappe/erpnext-worker:: invalid reference format

I’ve no experience with setting up docker on windows

HI,

same issue. Did you solve it?
Thanks

Not yet! Now i am trying to install the development version.
let’s see , will update you here.

Caret ^ shift+6 is used for multiline on windows…

1 Like

I am trying to follow steps and starting development version locally. But I am getting this error in site-creator logs. I started it again but getting same. Do we need to do anything?

/usr/local/bin/docker-entrypoint.sh: line 68: /home/frappe/frappe-bench/sites/apps.txt: Permission denied
config file not created, retry 1
config file not created, retry 2
config file not created, retry 3
config file not created, retry 4
config file not created, retry 5
config file not created, retry 6
config file not created, retry 7
config file not created, retry 8
config file not created, retry 9
config file not created, retry 10
config file not created, retry 11
config file not created, retry 12
config file not created, retry 13
config file not created, retry 14
config file not created, retry 15
config file not created, retry 16
config file not created, retry 17
config file not created, retry 18
config file not created, retry 19
config file not created, retry 20
config file not created, retry 21
config file not created, retry 22
config file not created, retry 23
config file not created, retry 24
config file not created, retry 25
config file not created, retry 26
config file not created, retry 27
config file not created, retry 28
config file not created, retry 29
config file not created, retry 30
config file not created, retry 31
timeout: config file not created

Sorry to say, docker implementation is very flaky, the site is not getting created after multiple tries. Is there a way to first create infra and then sites separately.

Yes, there is a pending issue Help wanted for making docker easy to run ¡ Issue #353 ¡ frappe/frappe_docker ¡ GitHub

Check docs for docker swarm based installation if it helps. No guarantee on windows. There is something with hyperv vs wsl vs wsl2.

Yesterday’s cron job

Site creation was successful in yesterday’s cron job.

Thanks @revant_one, appreciate your response. I will try again. I am repeating the steps again and again, it created site once but that also was throwing 500, internal server error. I will spend some more time today to get this working.

I am doing the setup on Ubuntu 20.04LTS VM 4core 8GB ram. I have 4 nodes in swarm, I will do the multisite once single site works

This will cause problems if volumes are not properly configured.

ERPNext needs volume for sites, files, site_config, logs. It needs ReadWriteMany access for multiple containers to access same volume for read-write.

In case of single node all volumes get created and mounted on same node.
In case of multi nodes, setup a separate NFS server and mount volume there or label the services such that they are deployed on same/labeled node.