Skip to content

dicer compose

Runs the instances a compose file describes, with the networks and volumes they use.

The file is dicer-compose.yaml or compose.yaml, in this directory or the nearest one above it that has one, unless -f names another. The project is named by -p, else the file’s name key, else its directory, and its instances are named PROJECT-SERVICE.

The project’s flags go before the command: dicer compose -f FILE up.

Examples

$ dicer compose up -d
$ dicer compose ps
$ dicer compose logs -f web
$ dicer compose exec db psql -U postgres
$ dicer compose -f staging.yaml down

Commands

CommandDescription
dicer compose configCheck the compose file and show it resolved.
dicer compose downStop and delete the project’s instances and networks.
dicer compose execRun a command inside a service’s running instance.
dicer compose logsShow the consoles of the project’s instances.
dicer compose psList the project’s instances.
dicer compose pullPull the services’ images.
dicer compose restartRestart the project’s instances.
dicer compose startStart the project’s stopped instances.
dicer compose stopStop the project’s running instances.
dicer compose upCreate and start the project’s instances.

Flags

FlagDescription
--env-file stringFile of variables to substitute (default: .env in the project directory).
-f, --file stringCompose file (default $DICER_COMPOSE_FILE, then dicer-compose.yaml or compose.yaml here or above).
--project-directory stringDirectory relative paths are taken from (default: the file’s).
-p, --project-name stringProject name (default $DICER_COMPOSE_PROJECT_NAME, then the file’s name, then its directory’s).