Back

Run multiple appwrite instances on one vm

  • 0
  • Self Hosted
  • General
Mr. T
24 Apr, 2023, 09:19

Hi,

I want to have multiple working appwrite instances on one vm. E.g. I want to have a stage and a production parallel on one vm. Is this possbile? If yes, is there a suggestion from your side on how to achieve this? What I have tried was using the .env variable COMPOSE_PROJECT_NAME, which would auto prefix the names, but this would not work on the containers. Then I removed all container_names of the docker-compose file. Now the appwrite services starts without problems, but in the startup I saw a bunch of problems (screenshot attached), but appwrite is still working. The messages would only occur on the very first run. Now when using docker compose up, I am not receiving any error messages. But the problem is now when the stage docker is running, the production system is not reachable anymore 😦

TL;DR
The user wants to run multiple Appwrite instances on one VM, one for staging and one for production. They tried using the COMPOSE_PROJECT_NAME variable but it didn't work. They also removed container names from the docker-compose file and now the services start without problems, but there were some error messages on the first run. Currently, only the staging docker is running and the production system is not reachable. One suggestion is to have two docker-compose files with different network, container name, and port settings, and to remove traefik. This way, the system can switch between appwrite1 and appwrite2 based on configuration needs.
Bouahaza
24 Apr, 2023, 13:06

You can, suggest you to look at docker networking

Bouahaza
24 Apr, 2023, 13:08

Depends if you want to duplicate all services needed by appwrite (mariadb, telegraf, etc..) or use same for twice appwrite

Bouahaza
24 Apr, 2023, 13:09

Quick answer : have 2 docker-compose with differents network/container name/port, remove traefik from them to have only one wich switch between appwrite1 & appwrite2 depends of confiuration need

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more