Stacks

Stacks

Stacks: docker compose over SSH (day-to-day deploys)

Your real workloads (barakoCMS, BaryoClub) run as compose projects, so this is the main deploy path.

# Register a compose project living on a VM
baryovm stack add barako --vm oracle --path /opt/barakocms

baryovm stack list
baryovm stack ps barako                                   # compose ps
baryovm stack deploy barako --force-recreate --service api,console
baryovm stack deploy barako --pull                        # pull images, then recreate
baryovm stack pull barako
baryovm stack logs barako --service api --tail 100
baryovm stack remove barako                               # forget the registration

Running stack add again for a stack that already exists updates it in place. --vm and --path are still required, and any other flag you pass replaces its value, but settings you do not name stay as they were, including the update policy from stack set-update. So adding a database to an existing stack is:

baryovm stack add barako --vm oracle --path /opt/barakocms --db-container deploy-postgres-1 --db-name barako

stack deploy flags: --service a,b (limit to services), --pull, --force-recreate, --no-deps.

Single-container deploy

baryovm deploy --vm oracle --image nginx:alpine --name site -p 80:80
baryovm deploy --vm oracle --image app:latest --name app \
  -p 127.0.0.1:8080:8080 -e KEY=value --pull