Download the PHP package pipo/raft without Composer
On this page you can find all versions of the php package pipo/raft. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package raft
Short Description A Docker-based development environment for CodeIgniter 4
License MIT
Informations about the package raft
CodeIgniter Raft
CodeIgniter Raft is a lightweight, Docker-powered development environment for CodeIgniter 4 that simplifies local development workflows. Built with PHP-FPM and Apache2, it provides a ready-to-use containerized setup with zero configuration required.
Introduction
CodeIgniter Raft provides a Docker-powered local development experience for CodeIgniter 4 that is compatible with macOS, Windows (WSL2), and Linux. Other than Docker, no software or libraries are required to be installed on your local computer before using Raft. Raft's simple CLI means you can start building your CodeIgniter application without any previous Docker experience.
Installation
You can install CodeIgniter Raft as a development dependency in your CodeIgniter project:
After installing CodeIgniter Raft, run the following command to set up the Raft configuration files in your project:
This command will copy the necessary Docker configuration files to your project's root directory.
Basic Usage
Starting & Stopping Raft
To start all of the Docker containers defined in your application's docker-compose.yml
file:
To stop all of the Docker containers:
Executing Commands
You can execute commands inside the application container using the raft
script:
PHP Commands
Composer Commands
CodeIgniter CLI Commands
Running Tests
Accessing MySQL
Opening a Shell
Configuring A Shell Alias
By default, Raft commands are invoked using the raft
script that is included with your project:
However, instead of repeatedly typing ./raft
to execute Raft commands, you may wish to configure a shell alias that allows you to execute Raft's commands more easily:
To make sure this is always available, you may add this to your shell configuration file in your home directory, such as ~/.zshrc
or ~/.bashrc
, and then restart your shell.
Once the shell alias has been configured, you may execute Raft commands by simply typing raft
. The remainder of this documentation's examples will assume that you have configured this alias:
Available Services
By default, Raft includes the following services:
- raft-app: The CodeIgniter application with PHP 8.2 and Apache
- mysql: MySQL 8.0 database
- redis: Redis server
- mailhog: MailHog for testing emails
Customization
Environment Variables
The following environment variables can be added to your project's .env
file to customize your Raft installation:
Adding Custom Services
You can add additional services to your application by creating a docker-compose.override.yml
file in your project's root directory.
Requirements
- Docker
- Docker Compose
- PHP 7.4 or higher
- Composer
License
CodeIgniter Raft is open-sourced software licensed under the MIT license.