Stakkr Commands

stakkr

Main CLI Tool that easily create / maintain a stack of services, for example for web development.

Read the configuration file and setup the required services by linking and managing everything for you.

stakkr [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

-c, --config <config>

Change the configuration file

-d, --debug, --no-debug
-v, --verbose

console

Enter a container to perform direct actions such as install packages, run commands, etc.

stakkr console [OPTIONS] CONTAINER

Options

-u, --user <user>

User’s name. Valid choices : www-data or root

-t, --tty, --no-tty

Use a TTY

Arguments

CONTAINER

Required argument

exec

Execute a command into a container.

Examples:

  • stakkr -v exec mysql mysqldump -p'$MYSQL_ROOT_PASSWORD' mydb > /tmp/backup.sql
  • stakkr exec php php -v : Execute the php binary in the php container with option -v
  • stakkr exec apache service apache2 restart
stakkr exec [OPTIONS] CONTAINER COMMAND...

Options

-u, --user <user>

User’s name. Be careful, each container have its own users.

-t, --tty, --no-tty

Use a TTY

Arguments

CONTAINER

Required argument

COMMAND

Required argument(s)

mysql

stakkr mysql is a wrapper for the mysql binary located in the mysql service.

You can run any mysql command as root, such as :

  • stakkr mysql -e "CREATE DATABASE mydb" to create a DB from outside
  • stakkr mysql to enter the mysql console
  • cat myfile.sql | stakkr mysql --no-tty mydb to import a file from outside to mysql

For scripts, you must use the relative path.

stakkr mysql [OPTIONS] [COMMAND]...

Options

-t, --tty, --no-tty

Use a TTY

Arguments

COMMAND

Optional argument(s)

refresh-plugins

Required to be launched if you install a new plugin

stakkr refresh-plugins [OPTIONS]

restart

Restart all containers

stakkr restart [OPTIONS]

Options

-p, --pull

Force a pull of the latest images versions

-r, --recreate

Recreate all containers

services

List available services available for compose.ini (with info if the service is enabled)

stakkr services [OPTIONS]

start

Start containers defined in compose.ini

stakkr start [OPTIONS]

Options

-p, --pull

Force a pull of the latest images versions

-r, --recreate

Recreate all containers

status

Display a list of running containers

stakkr status [OPTIONS]

stop

Stop the services

stakkr stop [OPTIONS]