Clone frappe_docker
git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker
cp -R devcontainer-example bench
docker-compose -f bench/docker-compose.yml up -d
docker exec -e "TERM=xterm-256color" -w /workspace/development -it bench_frappe_1 bash
# Install bench for root
supo pip3 install -e /home/frappe/.bench
# Create frappe-bench
bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
cd frappe-bench
# Set docker specific hosts
bench set-mariadb-host mariadb
bench set-redis-cache-host redis-cache:6379
bench set-redis-queue-host redis-queue:6379
bench set-redis-socketio-host redis-socketio:6379
# Get ERPNext
bench get-app --branch version-12 erpnext
# Create new site
bench new-site myerp.mysite.com --mariadb-root-password 123 --admin-password admin --no-mariadb-socket
# Install ERPNext on site
bench --site myerp.mysite.com install-app erpnext
# Setup supervisor (includes nginx)
bench setup supervisor --skip-redis
# Symlink or copy supervisor and nginx configs
sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
# Or copy supervisor and nginx configs
sudo cp `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
sudo cp `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
# exit container
docker exec --user root -e "TERM=xterm-256color" -w /workspace/development -d bench_frappe_1 supervisord
docker exec --user root -e "TERM=xterm-256color" -w /workspace/development -d bench_frappe_1 supervisorctl stop all
Notes:
- publish port 80 in bench/docker-compose.yml
- Add volumes for
/etc/nginx/conf.d/
and/etc/supervisor/conf.d/
- default frappe/bench:latest image does not have supervisor and nginx installed. Either install or build new image with frappe/bench as base image
Hope someone who uses windows helps you. I use Linux.