-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.md.addition
More file actions
32 lines (22 loc) · 953 Bytes
/
README.md.addition
File metadata and controls
32 lines (22 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Multi-Instance Setup with Leader/Follower Pattern
For cluster setups with shared workspace volume, you can configure containers with distinct roles:
- **LEADER**: Pushes changes from local directories to workspace
- **FOLLOWER**: Pulls changes from workspace to local directories
### Configuration
Set the `COMFY_DEV_ROLE` environment variable to `LEADER` or `FOLLOWER`:
```bash
# Example
COMFY_DEV_ROLE=LEADER
```
### Docker Compose Example
See `docker-compose.example.yml` for a complete multi-instance setup:
```bash
# Start the leader/follower setup
docker compose -f docker-compose.example.yml up -d
```
### Behavior
- Leader initializes the shared workspace and performs initial setup
- Followers wait for leader to complete critical steps before proceeding
- Leader pushes local changes to workspace
- Followers pull workspace changes to local directories
- This prevents race conditions when multiple instances share the same volume