Official Docker for frappe

Do you specifically want to run ERPNext base on Centos image, or your server is Centos.
If it is the latter, you could use my setup.

You could simply try by stop all running container then run
docker pull pipech/erpnext-docker-debian:stable
docker run -d -p 8000-8005:8000-8005 -p 9000-9005:9000-9005 -p 3306-3307:3306-3307 pipech/erpnext-docker-debian:stable
Then wait a few second and try http://localhost:8000

If it works, then you can try production setup.

What I meant by naming erpnext-docker-debain is it is ERPNext image base on debian image, but it can run on any os that have docker.

1 Like

Hi @pipech

Thanks a lot for the clarification. I will try it and let you know how it goes. Much appreciated

Kind regards,

Hi @pipech

Trust you’re doing well. I’m following your guide for installing ERPNext in production and I’ve gotten to the point of running init.sh but it’s been updating DocTypes for Frappe for almost an hour now! Should it take this long?

frappe@ebecdfxxxxxx:~/bench$ cd .. && cd production_config && . init.sh
++ benchWD=/home/frappe/bench
++ cd /home/frappe/bench
++ sudo chown -R frappe:frappe sites/apps.txt sites/assets sites/common_site_config.json sites/currentsite.txt sites/site1.local
++ sudo chown -R frappe:frappe logs/bench.log logs/frappe.log logs/node-socketio.error.log logs/node-socketio.log logs/schedule.error.log logs/schedule.log logs/web.error.log logs/web.log logs/worker.error.log logs/worker.log
++ cd sites
++ rm -rf site1.local
++ cd ..
++ bench set-mariadb-host mariadb
++ bench new-site mynewsite.org

Installing frappe...
Updating DocTypes for frappe        : [========================================]

Please advise

Thanks

Update:

The session eventually got disconnected. I reconnected and tried running init.sh again but got an error saying that “database already exists”

Should I assume that the process actually completed successfully? Is there any way to confirm or do I just proceed with the remaining steps?

Thanks

I decided to complete the remaining steps and see if it works

The output of docker service ls shows that all 6 services are running but docker logs <frappe container id> returns the error below:

Error: No such container:

I find this quite strange since the container is actually running

Please advise

Thanks

Hi,

I don’t think it’ll works, because production setup need your domain name point to server ip address.

You’ll need start new setup with your domain name.

The problem with Updating DocTypes for Frappe, make sure you server has at least 2 gm of ram if it already is you could try using older erpnext-docker-debian image.

If you have further question or error you should post it on github issue page Issues ¡ pipech/erpnext-docker-debian ¡ GitHub

Best regards :smiley:

Thanks a lot @pipech

Will continue discussion on the Github issue page as advised

Cheers

I followed following steps and looked like all the process went well, but the http://localhost:8000/ gives “Site can’t be reached”;

git clone --depth 1 GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext
cd frappe_docker
docker-compose up -d
./dbench init

Any hint on what I am missing?

  1. First time setup
    ./dbench init

  2. Command to start all the containers
    docker-compose start

  3. Command to be executed everytime after starting your containers
    ./dbench -s

  4. Command to enter your container
    docker exec -it frappe bash

  5. All bench commands can also be directly run from the host machine by using dbench. For instance bench start can be executed by running ./dbench -c start. Just preface the option with ./dbench -c. For more information on dbench run the command ./dbench -h.

Init create the site and setup an erpnext env.
You need to run the server with ./dbench -c start to get localhost:8000 active.
Don’t forget the ./dbench -s to setup docker image

Hello all,
I try to install but I have this issue

frappe@6c4d4506a689:~$ bench init frappe-bench --ignore-exist --skip-redis-config-generation
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
Traceback (most recent call last):
File “/usr/local/bin/virtualenv”, line 11, in
sys.exit(main())
File “/usr/local/lib/python2.7/dist-packages/virtualenv.py”, line 712, in main
symlink=options.symlink)
File “/usr/local/lib/python2.7/dist-packages/virtualenv.py”, line 927, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File “/usr/local/lib/python2.7/dist-packages/virtualenv.py”, line 1389, in install_python
os.symlink(py_executable_base, full_pth)
OSError: [Errno 30] Read-only file system

Do you have an idea where is the issue ?

THhs is your issue. Google search this and you should find solutions

  1. if that is the case the README is missing these steps. I’ll add them and send a PR would that be
  • ./dbench -s
  • ./dbench -c start
  • ./dbench -s
  1. it seems the develop branch of erpnext is installed. Is that on purpose in order to get a development installation installation running or can u set some option somewhere to install a production ready ERPNext?

I guess it would be the bench get-app in line 25 of the dbench script which needs some option in order to clone from the master branch?

yes, I know how to use Google … There are many solutions, but what about THE solution ? The command “os.symlink (py_executable_base, full_pth)” causes the error … What the installator do at this time ? and where ? If I understand this I understand who is ReadOnly …

it seems to be a user permission issue. Check if your user frappe has all the read, write create etc. permissions in the folder you are trying to do bench init

1 Like

Many thanks @jodeq.

./dbench -c start did the trick.

The new clone does not work, looks like dbench script is now new one and not the same as previous

Step 1. git clone --depth 1 GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext
Step 2. cd frappe_docker
Step 3. ./dbench setup docker
Step 4. ./dbench init
Step 5. ./dbench start

Any help?