-
I'm working on deploying Foundry to AWS Elastic Beanstalk (open source!) and I'm wondering if it will work for me to have this container scale to multiple instances. Beanstalk occasionally updates its Docker version so updating that automatically without disrupting service requires two instances to run at a time. I'm also generally curious as to whether I could scale this application to multiple instances all using the same world. Seems like this answer points towards running more than one instance being a bad idea. I'm planning on mounting an Elastic Filesytem (EFS) volume to the container. Will the different instances fight over the same files while read/writing and cause issues? I'll also mention Docker Swarm in this question for people searching questions in the future. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Good question. I think you did find the answer in #166. It is my understanding that FoundryVTT assumes that the I couldn't find anything specifically in the FoundryVTT documentation about user data locking or access. If you manage to get this working I'd be keen to know. Also, thanks for Open Sourcing your work! |
Beta Was this translation helpful? Give feedback.
-
Hi, If it's help some coming here, i used to run several instances of foundry with docker compose and sharing all the data to facilitate upgrade. version: "3"
services:
foundry-sw:
container_name: foundry-sw
image: felddy/foundryvtt:release
hostname: Ganesha-sw
init: true
volumes:
- foundry-datas:/data/Data
- foundry-config1:/data/Config
- foundry-logs1:/data/Logs
- foundry-cache:/data/container_cache
environment:
- FOUNDRY_WORLD=star-wars
- FOUNDRY_USERNAME=whoiam
- FOUNDRY_PASSWORD=loremipsumpassword
- FOUNDRY_ADMIN_KEY=loremipsumpassword
- FOUNDRY_HOSTNAME=rpg.myhost.com
- FOUNDRY_ROUTE_PREFIX=star-wars
- FOUNDRY_PROXY_SSL=true
- FOUNDRY_PROXY_PORT=443
- FOUNDRY_LICENSE_KEY=myKey
- FOUNDRY_MINIFY_STATIC_FILES=true
restart: unless-stopped
networks:
web:
labels:
- "traefik.enable=true"
- "traefik.http.routers.rpgrootsw.entrypoints=https"
- "traefik.http.routers.rpgrootsw.rule=Host(`rpg.myhost.com`) && PathPrefix(`/star-wars`)"
- "traefik.http.routers.rpgrootsw.tls.certresolver=myresolv"
- "traefik.http.services.rpgrootsw.loadbalancer.server.port=30000"
foundry-dnd5:
container_name: foundry-dnd5
image: felddy/foundryvtt:release
hostname: Ganesha-dnd
init: true
volumes:
- foundry-datas:/data/Data
- foundry-config2:/data/Config
- foundry-logs2:/data/Logs
- foundry-cache:/data/container_cache
environment:
- FOUNDRY_WORLD=dnd5
- FOUNDRY_USERNAME=whoiam
- FOUNDRY_PASSWORD=loremipsumpassword
- FOUNDRY_ADMIN_KEY=loremipsumpassword
- FOUNDRY_HOSTNAME=rpg.myhost.com
- FOUNDRY_ROUTE_PREFIX=dnd5
- FOUNDRY_PROXY_SSL=true
- FOUNDRY_PROXY_PORT=443
- FOUNDRY_LICENSE_KEY=myKey
- FOUNDRY_MINIFY_STATIC_FILES=true
restart: unless-stopped
networks:
web:
labels:
- "traefik.enable=true"
- "traefik.http.routers.rpgrootdnd5e.entrypoints=https"
- "traefik.http.routers.rpgrootdnd5e.rule=Host(`rpg.myhost.com`) && PathPrefix(`/dnd5`)"
- "traefik.http.routers.rpgrootdnd5e.tls.certresolver=myresolv"
- "traefik.http.services.rpgrootdnd5e.loadbalancer.server.port=30000"
volumes:
foundry-config1:
foundry-config2:
foundry-logs1:
foundry-logs2:
foundry-cache:
foundry-datas:
networks:
web:
external: true |
Beta Was this translation helpful? Give feedback.
Good question. I think you did find the answer in #166. It is my understanding that FoundryVTT assumes that the
data
directory is its own. If I recall correctly it does implement some locking. Opening the same world in two FoundryVTT instances is almost certainly going to cause some heartburn.I couldn't find anything specifically in the FoundryVTT documentation about user data locking or access.
It's a pretty frequent topic on the Discord. Here is a sample response from a couple of days ago emphasizing separate user data paths for instances.
If you manage to get this working I'd be keen to know. Also, thanks for Open Sourcing your work!