I followed the setup for single bench for 1 site and it worked, now I have added another site, and here is my .env:
SITE_NAME=erp1.[domain].com
SITES=`erp1.[domain].com,erp2.[domain].com`
NEW
SITE_NAME=erp2.[domain].com
SITES=`erp1.[domain].com,erp2.[domain].com`
I ran docker-compose pull
and up -d
and the logs from site-creator
indicate that the site was created but both sites are giving 404 errors.
Here’s someone who was lucky to install multi tenant setup.
And here it is! Containerized multi-tenant production:
[11%20PM]
[12%20PM]
This took about 50 minutes from start to finish. When I say “start to finish”, I mean exactly that: from when I decided to start trying to when I was completely done. It would have been a lot quicker if I didn’t have to wait for DNS to propagate. Of those 50 minutes, about 10 of them were active. The rest were waiting for things to download.
I loaded up a fresh VPS instance (Ubuntu 20), installed docker and docker-c…
Check traefik dashboard, services, routers, etc. Nothing much I can help.
I can install it on your server if you add my ssh keys.
2 Likes
peterg
August 28, 2021, 1:17am
3
Just off hand, your sites variable looks wrong. Each site name needs to be wrapped in backticks individually. At the moment, your server is being told you have one site called erp1.[domain].com,erp2.[domain].com
, which of course doesn’t resolve.
# Site operations
> 💡 You should setup `--project-name` option in `docker-compose` commands if you have non-standard project name.
## Setup new site
Note:
- Wait for the `db` service to start and `configurator` to exit before trying to create a new site. Usually this takes up to 10 seconds.
```sh
docker-compose exec backend bench new-site <site-name> --mariadb-root-password <db-password> --admin-password <admin-password>
```
If you need to install some app, specify `--install-app`. To see all options, just run `bench new-site --help`.
To create Postgres site (assuming you already use [Postgres compose override](images-and-compose-files.md#overrides)) you need have to do set `root_login` and `root_password` in common config before that:
```sh
docker-compose exec backend bench set-config -g root_login <root-login>
This file has been truncated. show original
2 Likes