Dockit
Dockerize it, (*1)
This is still Work in Progress, (*2)
What is this for?
This is a command line tool that allows you to create and manage PHP projects.
It allows you to install a local development environment, without being stricted to your local environment., (*3)
A real use-case scenario would be a development agency that has multiple websites with different requirements;
Such as project X with PHP 7.0, MySQL and Solr; but also having project Y with PHP 7.1, and ElasticSearch.
Yet you want to work on these projects simultaneously, without having to switch the FPM instance all the time., (*4)
ToDo
What's left To Do?, (*5)
- Fix MySQL issue where the host of Docker isn't allowed to connect (
Host '172.18.0.1' is not allowed to connect to this MySQL server
)
- Add ElasticSearch
- Add Solr
- Allow Apache or Nginx
- Revamp the entire system, as this was based on a PoC, but extending makes it quite hard...
How to install?
1.) First ensure you have the latest php (>= 7.1) installed, preferably the latest stable:, (*6)
brew install php@7.2
2.) Also ensure you have composer installed:, (*7)
brew install composer
3.) Now install Dockit globally:, (*8)
composer global require jketelaar/dockit
dockit config
This creates a configuration setup for your current project, based on the arguments you give in the CLI.
Simply type in dockit config
and answer what the CLI requests., (*9)
dockit start
Starts the Docker containers for the current project., (*10)
dockit stop
Stops the Docker containers for the current project., (*11)
dockit restart
Restarts the Docker containers for the current project., (*12)
dockit open
Opens the current project in your browser., (*13)
dockit haproxy
Opens the HAProxy in your browser., (*14)