Stack Commands
Stack Commands
Every stack operation goes through the 8v stack command. Here's what each subcommand does.
Overview
| Command | What it does |
|---|---|
8v stack up | Start services (foreground with logs) |
8v stack up -d | Start services (background) |
8v stack down | Stop services |
8v stack status | Show running services |
8v stack logs | View service logs |
8v stack exec | Run a command inside a service |
8v stack pull | Pull an OCI image |
8v stack build | Build an image from a Dockerfile |
8v stack validate | Check configuration for errors |
8v stack up
Start all services defined in your stack configuration.
8v stack up [options] [services...]
| Flag | Description |
|---|---|
-d, --detach | Run in the background. Return immediately after services start. |
--path <dir> | Path to the project directory. Defaults to the current directory. |
-n, --namespace <name> | Namespace to deploy into. |
In foreground mode (the default), 8Vast streams logs from all services to your terminal. Press Ctrl+C to stop everything.
In detached mode (-d), services run in the background and the daemon manages them. Use 8v stack status and 8v stack logs to monitor.
Start specific services by naming them:
8v stack up database redis
Dependencies are resolved automatically. If api depends on database and you run 8v stack up api, the database starts too.
8v stack down
Stop running services and release their resources.
8v stack down [options] [services...]
| Flag | Description |
|---|---|
--path <dir> | Path to the project directory. |
-n, --namespace <name> | Namespace. |
Stop everything:
8v stack down
Stop specific services:
8v stack down redis
8v stack status
Show the state of all services in the stack.
8v stack status [options]
| Flag | Description |
|---|---|
--path <dir> | Path to the project directory. |
-n, --namespace <name> | Namespace. |
Output includes the service name, image, CPU and memory allocation, current status, IP address, and health check result:
Name Image CPU Mem Status IP Health
-----------------------------------------------------------------------------------------------
database postgres:15 1 512 running 192.168.64.5 healthy
redis redis:7 1 512 running 192.168.64.6 healthy
api myrepo/api:latest 2 1024 running 192.168.64.7 healthy
8v stack logs
View output from a running service.
8v stack logs <service> [options]
| Flag | Description |
|---|---|
-f, --follow | Follow log output in real time (like tail -f). |
--tail <n> | Number of lines to show. Default: 100. |
--path <dir> | Path to the project directory. |
-n, --namespace <name> | Namespace. |
Examples:
8v stack logs database # Last 100 lines
8v stack logs database -f # Follow in real time
8v stack logs database --tail 50 # Last 50 lines
8v stack logs database -f --tail 20 # Start with last 20, then follow
8v stack exec
Run a command inside a running service. Opens an interactive shell by default.
8v stack exec <service> [options] [-- command...]
| Flag | Description |
|---|---|
--path <dir> | Path to the project directory. |
-n, --namespace <name> | Namespace. |
Examples:
8v stack exec database # Opens /bin/sh
8v stack exec database -- psql -U postgres # Run psql directly
8v stack exec api -- npm run migrate # Run a migration
The -- separator is required before the command to prevent flags from being interpreted by 8v itself.
8v stack pull
Pull an OCI image from a registry and cache it locally.
8v stack pull <image>
Examples:
8v stack pull postgres:15
8v stack pull redis:7-alpine
8v stack pull ghcr.io/myorg/myapp:v2.1
After pulling, 8Vast reports the image config digest and number of layers. Pulled images are cached — 8v stack up uses the cache instead of pulling again.
8v stack build
Build an OCI image from a Dockerfile.
8v stack build [context] [options]
| Flag | Description |
|---|---|
-f, --file <path> | Path to Dockerfile. Default: Dockerfile in the context directory. |
-t, --tag <tag> | Tag for the built image. |
The context defaults to the current directory. Example:
8v stack build ./backend -t myapp:latest -f Dockerfile.prod
8v stack validate
Check your stack configuration for errors without starting anything.
8v stack validate [options]
| Flag | Description |
|---|---|
--path <dir> | Path to the project directory. |
If the configuration is valid, it prints each service name and image. If there are errors — port conflicts, missing images, circular dependencies, invalid values — it reports them.
8v stack validate
# Valid stack config (.8v/stack.yaml)
# database (postgres:15)
# api (myrepo/api:latest)
# redis (redis:7)
Run this before 8v stack up to catch mistakes early.
Common flags
Three flags are shared across most commands:
--path <dir>— Point to a project directory other than the current one. 8Vast resolves this to an absolute path before sending it to the daemon.-n,--namespace <name>— Deploy into a specific namespace. Useful for running multiple stacks from the same project.services...(positional) — Limit the command to specific services. Available onupanddown.