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.