I'm using docker swarm and deploy compose file with stack.
I checked executor container has proper _APP_EXECUTOR_RUNTIME_NETWORK and OPEN_RUNTIMES_NETWORK environment variable.
But my openruntimes container does not joined into appwrite_runtimes network automatically.
Solve with following instructions
- Create network manually
docker network create -d overlay --attachable appwrite_runtimes - Use external network in compose file
networks:
runtimes:
external: true
name: appwrite_runtimes
When using swarm mode, appwrite_runtimes cannot attachable manually so it missing when create openruntimes container
You'll need to do the networks overlay and attachable
You can check this https://book.appread.io/docker-swarm And the Swarm file here https://github.com/byawitz/scaling-appwrite/tree/main/swarm
Can you run the
docker network inspect appwrite_runtimes
Also, when deploying Docker swarm the appwrite-executor can't be scaled
You can see at the chapter I've referenced here And here in the note https://book.appread.io/benchmarks#docker-swarm
Thanks for the link, i will read all of it
👍 Notice that this approach I've wrote use the a decentralizated Database and storeage https://book.appread.io/decentralization
I think that the compose file in the github will generate containers without any environment variables
Since swarm mode does not use .env files
It don't use the env_file approach rather a different one
Check here
https://book.appread.io/docker-swarm#deploying-the-stack
By running this command
export $(grep -v '^#' .env | xargs) && docker stack config -c docker-compose.yml
That will put all the .env variables in the path
So when you're deploying the task it will use all the environment variables
I used source .env but it was not work.
I'm too noob to shell scripting. 😆
Try that approach and let me know if it worked
Working with export $(...) very interesting
It goes like this
grep -v '^#' .envwill output all the variables inside the.envfilexargswill run the command onexporton each of the values.
And unlike source, export pass values to commands so it still exists while executing docker commands
Yes and no
When running export linux will add the value into the system environment which you can find by running
env
source on the other hand runs the list of bash inside a given file.
oh...
after export $(), env shows include .env definitions but source does not
Yes
[SOLVED] executor does not deploy openruntimes container with proper network
Recommended threads
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...