Docker Compose Passthrough
Graft uses a hybrid command architecture. While it has many native commands for infrastructure and deployment management, it also acts as a powerful proxy for Docker Compose.
Any command not natively handled by Graft is automatically passed to docker compose on the remote server!
Simply replace docker compose with graft in your terminal, and Graft will take your command straight to your server’s project.
See the full list of available commands at the Docker Compose Documentation.
Common Passthrough Commands
Section titled “Common Passthrough Commands”Here are some of the most common Docker Compose commands you can run through Graft.
Container Management
Section titled “Container Management”# View container statusgraft ps
# Start all servicesgraft up
# Stop all servicesgraft down
# Stop a specific servicegraft stop backend
# Start a specific servicegraft start frontend
# Restart a specific servicegraft restart backendDebugging & Inspection
Section titled “Debugging & Inspection”# Execute commands in running containersgraft exec backend ls -la /app
# Open an interactive shell in a running containergraft exec backend sh
# Run one-off commands in new containersgraft run backend /app/main --version
# View container logs (standard Compose logs)graft logs backend --tail=50 --follow
# Show running processes in a containergraft top backendImages & Builds
Section titled “Images & Builds”# View images on the remote hostgraft images
# Build or rebuild servicesgraft build backend
# Build without using cachegraft build --no-cache backendConfiguration & Scaling
Section titled “Configuration & Scaling”# View the merged docker-compose configurationgraft config
# Scale a service to multiple instancesgraft up --scale backend=3Global Context
Section titled “Global Context”You can use the -p or --project flag to run passthrough commands for any project from any directory:
# Check status of another projectgraft -p my-other-app ps
# Restart a service in another projectgraft -p my-other-app restart api