This is a template project for CodeIgniter 4, a powerful PHP framework for building web applications. It comes pre-configured with Docker, Nginx, MySQL, Adminer, phplint, Psalm, and PHP_CodeSniffer to streamline your development process.
- Dockerized Environment: Jumpstart development with containers for PHP, Nginx, MySQL, and Redis.
- Web Server: Pre-configured Nginx for robust performance.
- Database Ready: MySQL setup for data storage and Redis for fast data caching.
- Development Tools: Integrated Adminer, phplint, Psalm, and PHP_CodeSniffer to ensure code quality.
- Custom PHP Configuration: Tailored php.ini for optimal development and production environments.
Before getting started, ensure that you have the following software installed on your system:
- Docker
- Docker Compose
To set up and run the project on your local machine, follow these steps:
git clone https://github.com/YuriiDorosh/CodeIgniter4-template.git
cd CodeIgniter4-template
Copy the example environment file and configure it as needed:
cp env .env
Run Docker Compose to start the development environment:
docker-compose up -d
This command will create and start the Docker containers defined in the docker-compose.yml file.
docker-compose exec php composer install
Once the Docker containers are running, you can access the application in your web browser:
- CodeIgniter Application: http://localhost:8080
- Adminer (Database Management Tool): http://localhost:8081
Running phplint
docker-compose exec php make phplint
Running Psalm
docker-compose exec php make psalm
Running PHP_CodeSniffer
docker-compose exec php make phpcs
When you're done working on the project, you can stop the Docker containers:
docker-compose down
For detailed documentation about CodeIgniter 4, visit the official documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.