This is what I ended up with, trying to combine the compose from appwrite, with your docs
This is being deployed to a two node docker swarm
I'm not sure about Portainer But let's see
So you have created a load-balancer between these two servers?
And when you're accessing each of those servers directly does it works?
Swarm handles that natively https://docs.docker.com/engine/swarm/key-concepts/
Yes, but you need to have something for it to hanlde it
Swarm mode has an internal DNS component that automatically assigns each service in the swarm a DNS entry. The swarm manager uses internal load balancing to distribute requests among services within the cluster based upon the DNS name of the service.
So what are you saying I should add?
It will happen automatically only if you have something that listened for the requests, then the smart DS routing would work
I have traefik added
its deployed globally
Tell me this
- How do you access the Swarm? through load balancer, or what?
Good
I have ngingx reverse proxy pointed at one of the servers 80/443
Okay, Let's first try this When you're accessing each of the Docker Swarm servers IP are you able to navigate in the whole Appwrite backend?
No, direct IP is not working, this is the error I am getting pretty much constantly
[Error] Timestamp: 2024-02-21T01:53:45+00:00
[Error] Method: GET
[Error] URL: /v1/account
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (account)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 556
For which URL?
https://10.10.10.67/console/project-65d5579d86b25c8bf81f
https://10.10.10.67/console
really any path
Okay And this is for both IPs?
Yes, this is happening on both severs, with the same error populating in both containers
seemingly at the same time
Okay So before moving to load-balancing we need to solve this issue first
What is the output of
docker service logs appwrite_appwrite
In one of your Docker Swarm instances
Recommended threads
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...