Can you run v10 & v11 on the same server with docker?

Has anyone been able to use two versions of bench on the same server?

Say v10 and 11 using docker.

this is a little misleading. Current release of bench is 4.1.
So I guess you are talking about frappe/erpnext when you say v10 / v11, right?

I think when you containerize those (docker, lxd) there shouldn’t be any problem to run v10 & v11 instances on the same (physical) server. The containerization’s job is to isolate things, so the scenario you are having in mind is what containers are all about.

1 Like

Yes. Running v10 and v11 on same server. Just make sure the nginx ports do not collide (check nginx conf) in both benches. Without docker.

i.e. among others this project by @pipech should have everything you need I guess.

Here is another one

Thank you @vrms

I’ve installed v11 using @pipech ‘s solution. Not sure how to add the v10 container.

Hi,

You achieve this by

  1. Create v10 yml file. Using code below.
  2. Change frontend rules. (Domain name)
  3. Create v10 config file. (You could copy from original one then change redis url "redis_cache": "redis://redis-cache-v10:13000")
  4. Deploy v10 stack docker stack deploy -c frappe_v10.yml f10
  5. Create new site on v10 container.

Let me know if you have more question.
:slight_smile:

version: '3.3'

services:
  frappe-v10:
	image: pipech/erpnext-docker-debian:v10-py2-latest
	deploy:
	  replicas: 1
	volumes:
	  - frappe-v10-sites-volumes:/home/frappe/bench/sites
	  - frappe-v10-logs-volumes:/home/frappe/bench/logs
	stdin_open: true
	tty: true
	command: ["sudo", "bash", "/home/frappe/entrypoint_prd.sh"]
	labels:
	  - "traefik.enable=true"
	  - "traefik.frontend.priority=30"
	  - "traefik.port=80"
	  - "traefik.frontend.rule=Host:examplev10.com"
	  - "traefik.docker.network=traefik_proxy"
	configs:
	  - source: frappe-v10-common-site-conf
		target: /home/frappe/bench/sites/common_site_config.json
	  - source: frappe-entrypoint-conf
		target: /home/frappe/entrypoint_prd.sh
	  - source: frappe-nginx-conf
		target: /etc/nginx/conf.d/default.conf
	  - source: frappe-supervisor-conf
		target: /etc/supervisor/conf.d/supervisor.conf
	networks:
	  - traefik_proxy
	  - frappe_db
	  - default

  redis-cache-v10:
	image: redis:4.0.10-alpine
	deploy:
	  replicas: 1
	configs:
	  - source: redis-cache-conf
		target: /etc/conf.d/redis.conf
	command: ["redis-server","/etc/conf.d/redis.conf"]
	networks:
	  - default

  redis-queue-v10:
	image: redis:4.0.10-alpine
	deploy:
	  replicas: 1
	configs:
	  - source: redis-queue-conf
		target: /etc/conf.d/redis.conf
	command: ["redis-server","/etc/conf.d/redis.conf"]
	networks:
	  - default

  redis-socketio-v10:
	image: redis:4.0.10-alpine
	deploy:
	  replicas: 1
	configs:
	  - source: redis-socketio-conf
		target: /etc/conf.d/redis.conf
	command: ["redis-server","/etc/conf.d/redis.conf"]
	networks:
	  - default

volumes:
  frappe-v10-sites-volumes:
  frappe-v10-logs-volumes:

configs:
  redis-cache-conf:
	file: ./conf/redis-conf/redis_cache.conf
  redis-queue-conf:
	file: ./conf/redis-conf/redis_queue.conf
  redis-socketio-conf:
	file: ./conf/redis-conf/redis_socketio.conf
  frappe-v10-common-site-conf:
	file: ./conf/frappe-docker-conf/v10/common_site_config_docker.json
  frappe-entrypoint-conf:
	file: ./conf/frappe-docker-conf/entrypoint_prd.sh
  frappe-nginx-conf:
	file: ./conf/frappe-docker-conf/nginx.conf
  frappe-supervisor-conf:
	file: ./conf/frappe-docker-conf/supervisor.conf

networks:
  traefik_proxy:
	external: true
  frappe_db:
	external: true
1 Like

Thank you. I will try this