In case you use Sublime Text and periodically edit, run local Docker Compose configs, this might be useful to you!
All you need to do is to save the following JSON Build System definition into your ST:
- Click "Tools -> Build System -> New Build System" and save the file below.
- Alternatively, follow "Preferences -> Browse Packages", navigate to the "User" folder, then copy and save the file there.
After that you'll be able to select new Docker-Compose build system to handle currently open Docker Compose configuration file. It's made in such a way that contains several sub-commands:
- Up interactively: prints container's logs into the ST console, and pressing
Ctrl+C
stops containers. - Up Detached: containers get started in daemon mode.
- Down: drop containers from the open file.
You can switch between the commands with Shift+Cmd+B
shortcut.
PS: this is my first open source thing related to ST, I'm not sure if it's needed to anyone, maybe there are better plugins available, or maybe I should publish my snippet as a plugin somwehre... Well, feedback and suggestions are welcome!