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
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...
- general_bad_request when creating accoun...
I have created a new bug request, could anyone have a look - https://github.com/appwrite/appwrite/issues/11908?
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...