Error trying to add new site in Docker

Hi ,

I have a ‘multi-bench’ Docker setup with one site already installed. Trying to install a second site is however giving errors. The actual addition of a new site seems to run smoothly but when I run the command to add the site to proxy docker-compose --project-name myproject-name up -d, I encounter the following error:

The Compose file './docker-compose.yml' is invalid because:
services.traefik.labels contains non-unique items, please remove duplicates from ['traefik.enable=true', '', '', '', '']
services.erpnext-nginx.labels contains non-unique items, please remove duplicates from ['traefik.enable=true', 'traefik.http.routers.erpnext-nginx.rule=Host(mynewsite.com)', '', '', 'traefik.http.services.erpnext-nginx.loadbalancer.server.port=80']

I would really appreciate any pointers as to what the issue might be

Thanks

https://github.com/frappe/frappe_docker/blob/develop/docs/multi-bench.md this setup is combination of multiple files and uses nginx to manage letsencrypt.

the ./docker-compose.yml and traefik is used in single bench setup, https://github.com/frappe/frappe_docker/blob/develop/docs/single-bench.md
In case of single docker-compose file, it includes traefik already, creating it again will cause error.

Use docker swarm setup if you plan to have multiple sites and multiple stacks.

Recently someone from community managed to build a custom stack out of official images. check this post Docker Installation - #5 by suodrazah you can check how that works if it helps.

1 Like

Hi @revant_one

I followed this guide when setting up the installation but there’s nothing specific on that page regarding sites so I assumed we were to follow the steps on the Site Operations page

What is the purpose of the multi-bench setup if it can’t be used to install more than 1 site ?

Pls advise

Thanks

Initially I had multi file setup.

People wanted simple docker-compose up I added that.

People then wanted Docker Swarm (stacks), I added that.

To support the first multi-file setup for people who had installed it previously, I moved the doc to multi-bench (with letsencrypt nginx proxy)

Then I opened up Issue if someone can help me make docker very easy to setup that I can’t seem to do. And there are lot of variations people are expecting from me to be added in frappe_docker docs. I need to have a mac, windows wsl, LAN, WAN, NAS. If i get hands on those for some paying clients, I’ll add my experience in docs.

I’m not the best documentation writer so there will always be missing docs. Whatever docs is in frappe_docker is contributed by community mainly.

1 Like

I really don’t know. Public demand I think.

I’d suggest learn docker, traefik, docker swarm. That’s what I did.

I use docker-swarm setup in case simple cost effective setup.
I prefer Kubernetes based installation.

I have some or other variations on each setup for custom apps or additional services so it’s even more complex to share in docs and create more confusion.

2 Likes

Thanks a lot for the clarification @revant_one. Just out of curiosity, what exactly do you refer to as multi-file setup ?

Multiple docker-compose files needed here:

docker-compose \
    --project-name <project-name> \
    -f installation/docker-compose-common.yml \
    -f installation/docker-compose-erpnext.yml \
    -f installation/erpnext-publish.yml \
    up -d

Single docker-compose.yml file picked up with this command:

docker-compose up -d

Ahhh… I see now

Thanks plenty

Related to Is Easy Install Script being phased out? - #20 by wale

I can do unlimited question and answers. If that helps in understanding. Someone who can write documentation can make it into manual. Because there are various use cases out there manual will always be incomplete.

With containers the hardware can range from raspberry Pi to multi master clusters.

Because it really differs from case to case. The free VM minimal RAM setup will only work with simple docker-compose.yml provided. It should be enough for quick setups.

Anything beyond that I’ll directly recommend going for Docker swarm. Even with single VM with 2gb+ RAM.

What I generally do for future proof setup is: I separate the data server hosting NFS, Redis and Mariadb. And keep all the containers on swarm.
That way I can dynamically add or remove swarm nodes if needed and data remains on separate server accessible under private network/firewall.

I’m in touch with @mwogi who managed to self host Kubernetes using Rancher on a bare metal server!! No manual out there for this, I answered questions and had access to their cluster. Hope we get to see some blog/walkthrough about it.