Managing the Tokaido Config

Each Tokaido environment is created from a shared config file that is placed in .tok/config.yml inside the project's Git repository.

You can modify this configuration file either directly or by using the config management commands which we'll discuss in a moment.

Because the config file is committed to your Git repository, you can easily share config settings with other developers in your team.

Using the Tokaido Config Editor

The config editor is accessed with the tok config command and is easily the quickest and simplest way to manage your Tokaido configuration.

Warning

To save changes made with tok config you must run `tok rebuild` to restart your Tokaido environment
$ tok config

Please choose the Tokaido config area you'd like to edit
Use the arrow keys to navigate: ↓ ↑ → ←

Main Menu >>

🤔 Tokaido Project Settings » - Tokaido settings that define how this project built
Drupal Settings » - Simple Drupal settings that Tokaido needs, like your document root
Nginx Settings » - Nginx config settings that can be controlled from your codebase
PHP FPM Settings » - FPM config settings that can be controlled from your codebase
Services » - Enable or disable additional Tokaido services like Solr and Mailhog
Exit

Take a look at the following video for a full demo of tok config in action.

Using config-set and config-get

Thetok command line interface has aliases that let you directly manage your configuration file. This is an advanced feature but a useful way to share config changes that can be easily applied by other people.

For example, to enable Solr support in your Tokaido environment, you can run tok config-set services solr enabled true

Or to turn off the background sync service: tok config-set system syncsvc enabled false

You can also use tok config-get to look up config settings, including defaults that might not be present in your .tok/config.yml file:

$ tok config-get system xdebug
{ Port: "", Logpath: "", Enabled: false, Autostart: false, }

Warning

To save changes made with tok config-set you must run `tok rebuild` to restart your Tokaido environment
Notice something wrong? Shoot us a PR!