From 934b088579655398648dcf3f3a46bd6adde094d5 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 30 Jul 2022 06:56:55 +0900 Subject: [PATCH 1/4] feat: copy the latest Vagrantfile.dist in CodeIgniter4 repository But it seems it does not work. See https://github.com/codeigniter4/CodeIgniter4/issues/2453 --- src/Vagrantfile.dist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Vagrantfile.dist b/src/Vagrantfile.dist index 857f923..e85393f 100644 --- a/src/Vagrantfile.dist +++ b/src/Vagrantfile.dist @@ -50,7 +50,7 @@ Vagrant.configure("2") do |config| PGSQL_ROOT_PASS="password" VIRTUALHOST="localhost" CODEIGNITER_PATH="/var/www/codeigniter" - PHP_VERSION=7.3 + PHP_VERSION=7.4 PGSQL_VERSION=10 #APT_PROXY="192.168.10.1:3142" @@ -166,8 +166,8 @@ Vagrant.configure("2") do |config| sed -i "s/APACHE_RUN_USER=www-data/APACHE_RUN_USER=vagrant/" /etc/apache2/envvars sed -i "s/APACHE_RUN_GROUP=www-data/APACHE_RUN_GROUP=vagrant/" /etc/apache2/envvars grep -q "Listen 81" /etc/apache2/ports.conf || sed -i "s/^Listen 80/Listen 80\\nListen 81\\nListen 82/" /etc/apache2/ports.conf - sed -i "s/^display_errors = Off/display_errors = On/" /etc/php/7.3/apache2/php.ini - sed -i "s/^display_startup_errors = Off/display_startup_errors = On/" /etc/php/7.3/apache2/php.ini + sed -i "s/^display_errors = Off/display_errors = On/" /etc/php/7.4/apache2/php.ini + sed -i "s/^display_startup_errors = Off/display_startup_errors = On/" /etc/php/7.4/apache2/php.ini echo "ServerName ${VIRTUALHOST} From d9e7811c4646aac8593f940001d2b50d76a43119 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 30 Jul 2022 07:16:17 +0900 Subject: [PATCH 2/4] docs: move the user guide description to READKME --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index a5509af..982a5a8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # CodeIgniter DevKit + Development toolkit for CodeIgniter libraries and projects ## Installation @@ -150,3 +151,41 @@ your code drops a dependency, so this workflow will help track those down. Besides the template files, this repo includes some examples for integrating CodeIgniter with other third-party resources. These files (in **Examples/**) may change over time and should not be relied on for anything more than a reference for your own code. + +## Hosting with Vagrant + +> **Note** +> The `Vagrantfile.dist` is unmaintained. It does not work now. +> Contributions are welcome. + +Virtualization is an effective way to test your webapp in the environment you +plan to deploy on, even if you develop on a different one. +Even if you are using the same platform for both, virtualization provides an +isolated environment for testing. + +The codebase comes with a **src/Vagrantfile.dist**, that can be copied to **Vagrantfile** +and tailored for your system, for instance enabling access to specific database or caching engines. + +### Setting Up + +It assumes that you have installed [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and +[Vagrant](https://www.vagrantup.com/downloads.html) +for your platform. + +The Vagrant configuration file assumes you have set up a [ubuntu/bionic64 Vagrant box](https://app.vagrantup.com/ubuntu/boxes/bionic64) on your system: + +```console +> vagrant box add ubuntu/bionic64 +``` + +### Testing + +Once set up, you can then launch your webapp inside a VM, with the command: + +```console +> vagrant up +``` + +Your webapp will be accessible at http://localhost:8080, with the code coverage +report for your build at http://localhost:8081 and the user guide for +it at http://localhost:8082. From 1d62c1bad0e47340b81ce4c4674ec3f994a06240 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 30 Jul 2022 07:22:34 +0900 Subject: [PATCH 3/4] feat: move Vagrantfile.dist to Template/ --- README.md | 20 ++++++++++---------- src/{ => Template}/Vagrantfile.dist | 0 2 files changed, 10 insertions(+), 10 deletions(-) rename src/{ => Template}/Vagrantfile.dist (100%) diff --git a/README.md b/README.md index 982a5a8..aef0cb2 100644 --- a/README.md +++ b/README.md @@ -146,13 +146,7 @@ Composer Unused does one thing: checks that your code actually uses the dependen have included via Composer. It can be easy to forget to update your **composer.json** when your code drops a dependency, so this workflow will help track those down. -## Example Files - -Besides the template files, this repo includes some examples for integrating CodeIgniter -with other third-party resources. These files (in **Examples/**) may change over time and -should not be relied on for anything more than a reference for your own code. - -## Hosting with Vagrant +### Hosting with Vagrant > **Note** > The `Vagrantfile.dist` is unmaintained. It does not work now. @@ -163,10 +157,10 @@ plan to deploy on, even if you develop on a different one. Even if you are using the same platform for both, virtualization provides an isolated environment for testing. -The codebase comes with a **src/Vagrantfile.dist**, that can be copied to **Vagrantfile** +The codebase comes with a **src/Template/Vagrantfile.dist**, that can be copied to **Vagrantfile** and tailored for your system, for instance enabling access to specific database or caching engines. -### Setting Up +#### Setting Up It assumes that you have installed [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and [Vagrant](https://www.vagrantup.com/downloads.html) @@ -178,7 +172,7 @@ The Vagrant configuration file assumes you have set up a [ubuntu/bionic64 Vagran > vagrant box add ubuntu/bionic64 ``` -### Testing +#### Testing Once set up, you can then launch your webapp inside a VM, with the command: @@ -189,3 +183,9 @@ Once set up, you can then launch your webapp inside a VM, with the command: Your webapp will be accessible at http://localhost:8080, with the code coverage report for your build at http://localhost:8081 and the user guide for it at http://localhost:8082. + +## Example Files + +Besides the template files, this repo includes some examples for integrating CodeIgniter +with other third-party resources. These files (in **Examples/**) may change over time and +should not be relied on for anything more than a reference for your own code. diff --git a/src/Vagrantfile.dist b/src/Template/Vagrantfile.dist similarity index 100% rename from src/Vagrantfile.dist rename to src/Template/Vagrantfile.dist From b9e67ea520604b727a38b411ae5b0112ad74eda2 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 30 Jul 2022 19:37:59 +0900 Subject: [PATCH 4/4] docs: fix Note --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aef0cb2..b8dba6b 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ your code drops a dependency, so this workflow will help track those down. ### Hosting with Vagrant > **Note** -> The `Vagrantfile.dist` is unmaintained. It does not work now. +> The `Vagrantfile.dist` is unmaintained. It might not work now. > Contributions are welcome. Virtualization is an effective way to test your webapp in the environment you