From a211e3ae4ad5cfcb1e56e66fc9919511d9518342 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Sun, 27 Nov 2022 14:02:40 +0100 Subject: [PATCH] Elaborate on how to set up dev env --- .gitignore | 7 ++----- README.md | 14 ++++++++++++-- config-dev.php.dist | 36 ++++++++++++++++++++++++++++++++++++ dev/docker-compose.yml | 11 +++++++++++ server | 2 +- 5 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 config-dev.php.dist create mode 100644 dev/docker-compose.yml diff --git a/.gitignore b/.gitignore index 6425cd7e..5371df28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ -.DS_Store -composer.lock -config.php -hashru.sublime-project -hashru.sublime-workspace +composer-setup.php +composer.phar diff --git a/README.md b/README.md index 6bdbbff5..c97a190a 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,22 @@ The Kabuki codebase requires the following PHP extensions to be enabled for full ## Setup -Copy `config.php.dist` to `config.php` and set-up the constants contained in the file. +Copy `config.php.dist` to `config.php` and set-up the constants contained in the file. For development, consider starting from `config-dev.php.dist`. + +Ensure you have a MySQL database running with credentials matching your `config.php`. For development, consider the /dev/docker-compose.yml file. + +Run `composer install`. If you do not have composer installed globally, run it from the project directory as follows: + +``` +wget -O composer-setup.php https://getcomposer.org/installer +php composer-setup.php --install-dir=. +php ./composer.phar install +``` ## Running For development purposes, simply run the `server` script provided in the root of this repository. -This will start a PHP development server on `hashru.local:8080`. +This will start a PHP development server on `127.0.0.1:8080`. For a production environment, please set up a proper PHP-FPM environment instead. diff --git a/config-dev.php.dist b/config-dev.php.dist new file mode 100644 index 00000000..18641bc8 --- /dev/null +++ b/config-dev.php.dist @@ -0,0 +1,36 @@ +