Application instance paths
The commands that operate with running instances compute instance file paths. Default paths are passed to every instance on start. Other commands use them to communicate with the instance – for example, to show the logs or connect to the instance through its console socket.
.cartridge.yml, located in the application root directory,
lets you override default paths for a locally running application.
Instead of indicating default paths with flags, you can do so by
defining values for similarly named keys in
For example, instead of
cartridge start --run-dir my-run-dir --cfg my-instances.yml --script my-init.lua
you can write the following in your
run-dir: my-run-dir cfg: my-instances.yml script: my-init.lua
.cartridge.yml, you can also enable or disable the
It is initially set to
true in the template application.
The run directory (
--run-dir) is where PID and socket files are stored.
More specifically, it contains:
- Instance PID files:
- Instance console sockets:
- Instance notify sockets:
The data directory (
--data-dir) contains the instances’
Each instance’s working directory is
The logs directory (
--log-dir) is where instance logs are stored
when the instances run in the background.
This directory is created on
cartridge start -d and can be used by
Each instance’s log file is
This file (
--cfg) lets you configure Cartridge instances.
The path to the file is passed to all instances
as the environment variable
See the configuration guide
myapp.router: advertise_uri: localhost:3301 http_port: 8081 myapp.s1-master: advertise_uri: localhost:3302 http_port: 8082 myapp-stateboard: listen: localhost:3310 password: passwd