Skip to content

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.


Here are some of the most common Docker Compose commands you can run through Graft.

Terminal window
# View container status
graft ps
# Start all services
graft up
# Stop all services
graft down
# Stop a specific service
graft stop backend
# Start a specific service
graft start frontend
# Restart a specific service
graft restart backend
Terminal window
# Execute commands in running containers
graft exec backend ls -la /app
# Open an interactive shell in a running container
graft exec backend sh
# Run one-off commands in new containers
graft run backend /app/main --version
# View container logs (standard Compose logs)
graft logs backend --tail=50 --follow
# Show running processes in a container
graft top backend
Terminal window
# View images on the remote host
graft images
# Build or rebuild services
graft build backend
# Build without using cache
graft build --no-cache backend
Terminal window
# View the merged docker-compose configuration
graft config
# Scale a service to multiple instances
graft up --scale backend=3

You can use the -p or --project flag to run passthrough commands for any project from any directory:

Terminal window
# Check status of another project
graft -p my-other-app ps
# Restart a service in another project
graft -p my-other-app restart api