| name | ops-run-local |
| description | Manage the local Docker Compose development environment. Supports start, stop, restart, and status operations. |
| allowed-tools | ["Bash","Read"] |
Manage Local Development Environment
Manage the local Docker Compose stack for the Your Project Rails application.
Action: $ARGUMENTS (expected: start, stop, restart, or status; default: start)
Workflow
Prerequisites (all actions)
-
Verify Docker is running:
docker info > /dev/null 2>&1
If not running, inform the user to start Docker Desktop.
-
Verify .env file exists:
test -f .env
If not, inform the user to copy env.sample to .env.
Action: start
-
Build and start all services in the background:
docker compose up --build -d
-
Wait for the db health check to pass:
docker compose ps
-
Run a health check:
curl -sf http://localhost:3000/up
-
Report the result: services running, port 3000 available
Action: stop
-
Stop all services:
docker compose down
-
Confirm services are stopped:
docker compose ps
Action: restart
-
Stop all services:
docker compose down
-
Build and start all services:
docker compose up --build -d
-
Health check:
curl -sf http://localhost:3000/up
Action: status
-
Show running containers:
docker compose ps
-
Run health checks:
curl -sf http://localhost:3000/up && echo "Web: healthy" || echo "Web: unhealthy"
-
Show recent logs (last 10 lines per service):
docker compose logs --tail=10 web worker
Execution
Run the specified action now.