Skip to content

Dockerized CodeIgniter is a pre-configured development environment for CodeIgniter 4, set up using Docker. It simplifies local development with ready-to-use containers for PHP, MySQL, and Nginx, enabling quick and consistent project setup.

Notifications You must be signed in to change notification settings

Azshurith/Dockerized-Code-Igniter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CodeIgniter 4 Dockerized Template

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.


📦 Stack

  • CodeIgniter 4
  • PHP-FPM (in .docker/Php)
  • Nginx (in .docker/Nginx)
  • MySQL 5.7 (in .docker/MySQL)
  • Docker Compose
  • Makefile utility commands

⚙️ Quick Start

# Start the app
make project_start

# Stop the app
make project_stop

# Destroy the app and volumes
make project_destroy

Access your project at: http://localhost:8080


🛠️ Development Utilities

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

📁 Project Structure

.
├── .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

🧪 Testing (Optional)

Run unit tests using:

docker exec -it codeigniter-php vendor/bin/phpunit

📝 Notes

  • Make sure .env is configured for your environment (CI_ENVIRONMENT, database, etc).
  • PHP container uses CodeIgniter CLI tools (php spark).
  • Database data persists via Docker volume.

About

Dockerized CodeIgniter is a pre-configured development environment for CodeIgniter 4, set up using Docker. It simplifies local development with ready-to-use containers for PHP, MySQL, and Nginx, enabling quick and consistent project setup.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published