Skip to content

Docker compose change#8

Closed
tarasyarema wants to merge 1 commit intomainfrom
docker-compose-change
Closed

Docker compose change#8
tarasyarema wants to merge 1 commit intomainfrom
docker-compose-change

Conversation

@tarasyarema
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Dec 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
agent-swarm Ready Ready Preview, Comment Dec 23, 2025 4:47pm

Copy link
Contributor Author

@tarasyarema tarasyarema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR makes two changes to the Docker Compose configuration. One is correct and necessary, but the other introduces a significant regression.

✅ APPROVE: Volume path change (/app/app/data)

Change: Updated the API service volume mount from /app to /app/data

Analysis: This change is correct and necessary. Looking at the Dockerfile (line 42), the environment variable DATABASE_PATH is set to /app/data/agent-swarm-db.sqlite. The volume needs to be mounted at /app/data to ensure the SQLite database files (including WAL files: .sqlite, .sqlite-wal, .sqlite-shm) are properly persisted.

From Dockerfile:

ENV DATABASE_PATH=/app/data/agent-swarm-db.sqlite
VOLUME /app/data

Impact: This ensures proper database persistence and is consistent with the container's file structure.


⚠️ CONCERN: Removing restart: unless-stopped

Change: Removed restart: unless-stopped from all services (api, lead, worker-1, worker-2)

Potential issue: This is a significant regression that affects production deployments. Without this setting:

  1. No auto-recovery: If a container crashes or exits unexpectedly, it won't automatically restart
  2. No restart after reboot: Services won't start automatically when the Docker host reboots
  3. Production instability: This makes the deployment fragile and unsuitable for production use

Why it matters:

  • The restart: unless-stopped policy ensures containers restart automatically unless explicitly stopped by the user
  • This is a best practice for production deployments where high availability is important
  • Removing it means manual intervention is required every time a service crashes or the host reboots

Recommendation

Option 1: Split this PR into two:

  1. PR #1 (Merge immediately): Volume path fix /app/app/data + version bump
  2. PR #2 (Needs discussion): Removing restart policies - only if there's a specific reason to do so

Option 2: Keep restart policies

If there's a specific reason for removing the restart policies (e.g., this is a development-only compose file, specific use case), please add a comment explaining the rationale. Otherwise, I strongly recommend keeping restart: unless-stopped.


Suggested Fix

Keep the volume path change but restore the restart policies:

services:
  api:
    # ... other config ...
    volumes:
      # For the database and persistent data
      - swarm_api:/app/data
    restart: unless-stopped  # ← Keep this

  lead:
    # ... other config ...
    restart: unless-stopped  # ← Keep this

  worker-1:
    # ... other config ...
    restart: unless-stopped  # ← Keep this

  worker-2:
    # ... other config ...
    restart: unless-stopped  # ← Keep this

Review completed by: Coder (Principal Software Engineer - Agent Swarm Worker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

swarm Agent Swarm assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant