{"action":"closed","issue":{"url":"https://api.github.com/repos/kitematic/kitematic/issues/880","labels_url":"https://api.github.com/repos/kitematic/kitematic/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/kitematic/kitematic/issues/880/comments","events_url":"https://api.github.com/repos/kitematic/kitematic/issues/880/events","html_url":"https://github.com/kitematic/kitematic/issues/880","id":98348635,"number":880,"title":"Feature request: CLI and project configuration management","user":{"login":"timbrandin","id":1715834,"avatar_url":"https://avatars.githubusercontent.com/u/1715834?v=3","gravatar_id":"","url":"https://api.github.com/users/timbrandin","html_url":"https://github.com/timbrandin","followers_url":"https://api.github.com/users/timbrandin/followers","following_url":"https://api.github.com/users/timbrandin/following{/other_user}","gists_url":"https://api.github.com/users/timbrandin/gists{/gist_id}","starred_url":"https://api.github.com/users/timbrandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbrandin/subscriptions","organizations_url":"https://api.github.com/users/timbrandin/orgs","repos_url":"https://api.github.com/users/timbrandin/repos","events_url":"https://api.github.com/users/timbrandin/events{/privacy}","received_events_url":"https://api.github.com/users/timbrandin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kitematic/kitematic/labels/feature","name":"feature","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-07-31T09:08:56Z","updated_at":"2015-09-12T00:39:43Z","closed_at":"2015-09-12T00:39:43Z","body":"**Hey, shouldn't Kitematic have a command line tool (CLI) and configuration management in a Kitematicfile (docker-compose.yml)!?**\r\n\r\nThat way one could store configuration for a projects container(s) in the repository of the project just like we already do for Vagrant.\r\n\r\n# [Kitematic CLI and configuration management](https://github.com/kitematic/kitematic/pull/881)\r\n\r\nStore configuration for a projects container(s) in the repository and start all of it's containers from the command line.\r\n\r\n## Example Configuration File\r\n\r\n### docker-compose.yml\r\n```yaml\r\nmysql:\r\n  image: \"mysql/mysql-server:5.7\"\r\n  volumes:\r\n    - /var/lib/mysql\r\n  environment:\r\n    - MYSQL_ALLOW_EMPTY_PASSWORD=yes\r\ndrupal:\r\n  image: \"timbrandin/drupal\"\r\n  ports: # (optional) Ports definitions.\r\n    - \"80\"\r\n  volumes: # (optional) Shared volumes/folders.\r\n    - ./:/var/www\r\n  links: # (optional) Container links.\r\n    - \"mysql:mysql\"\r\n```\r\n\r\n## Command Line Interface – API\r\n\r\n* `kitematic list`\r\n\r\n  Lists the status of container(s) managed in the docker-compose.yml\r\n\r\n* `kitematic run`\r\n\r\n  Starts the container(s) with it's setup from the docker-compose.yml\r\n\r\n* `kitematic stop`\r\n\r\n  Stops the container(s) defined in the docker-compose.yml\r\n\r\n* `kitematic remove`\r\n\r\n  Removes the container(s) defined in the docker-compose.yml\r\n\r\n* `kitematic restart`\r\n\r\n  Restart the container(s) defined in the docker-compose.yml\r\n\r\n* `kitematic init`\r\n\r\n  Create an example docker-compose.yml\r\n\r\n> NOTICE! If you're using the public beta version of the Kitematic tool => Then your docker-machine's name will be \"dev\". Change the docker machine by exporting \"dev\" for your DOCKERMACHINE environment variable: `export DOCKERMACHINE=\"dev\"`. If you think it is something else you can always run: `docker-machine list`.\r\n\r\n## Benefits\r\n\r\n> I guess there's a ton of benefit being able to store configuration on how to get your project up and running. I've listed a few:\r\n\r\n* Store cache in .kitematic (similar to .vagrant) on last used random ports and reuse them next time if available, which is great if you've stored passwords for .htpasswd, login-sessions, cookies or similar for your web app. \r\n* Get a multi-container environment up and running with links between them already setup for you.\r\n* Choose to use NFS for shares, and have the Kitematic CLI set that up for you.\r\n* Save/Backup configuration you've added or edited in the Kitematic GUI.\r\n* Setup Port forwarding to Windows or OSX.\r\n* Tools like [Puphpet](https://puphpet.com/) could autogenerate the Kitematicfile for common setups."}}