A ready-to-use Docker environment for developing modern applications with CodeIgniter 4. Includes MySQL, Nginx, and PHP containers with an easy Makefile interface for migrations, seeding, and more.
- CodeIgniter 4
- PHP-FPM (in .docker/Php)
- Nginx (in .docker/Nginx)
- MySQL 5.7 (in .docker/MySQL)
- Docker Compose
- Makefile utility commands
# Start the app
make project_start
# Stop the app
make project_stop
# Destroy the app and volumes
make project_destroyAccess your project at: http://localhost:8080
| Command | Description |
|---|---|
make deploy |
π§ Opens a shell in the PHP container |
make migrate |
ποΈ Runs all pending database migrations |
make make_migration NAME=MigrationName |
π Creates a new migration file |
make seed |
π± Runs the database seeder inside the container |
.
βββ .docker/ # Docker config files
β βββ MySQL/ # MySQL customizations
β βββ Nginx/ # Nginx config (default.conf)
β βββ Php/ # PHP Dockerfile, custom INIs
β
βββ Web/
β βββ app/ # Main CodeIgniter app
β β βββ Config/
β β βββ Controllers/
β β βββ Models/
β β βββ Views/
β β βββ ...
β βββ public/ # Public folder (index.php, js/)
β βββ tests/ # Automated tests
β βββ vendor/ # Composer dependencies
β βββ writable/ # Cache, logs, session, uploads
β
βββ docker-compose.yml
βββ Makefile
βββ README.md
Run unit tests using:
docker exec -it codeigniter-php vendor/bin/phpunit- Make sure
.envis configured for your environment (CI_ENVIRONMENT, database, etc). - PHP container uses CodeIgniter CLI tools (
php spark). - Database data persists via Docker volume.