m1n64/codeigniter4-docker-appstarter

CodeIgniter4 starter app

1.0.1 2025-02-13 19:08 UTC

This package is auto-updated.

Last update: 2025-03-13 19:17:46 UTC


README

Clean CI4 framework with docker template.

Stack

PHP 8.3 (CodeIgniter 4.6.0), PostgreSQL, Redis, nginx

How to install

composer create-project m1n64/codeigniter4-docker-appstarter my-awesome-project
cp env .env

Then, config database name POSTGRES_DB in line 34 in docker-compose.yml, and database.default.database in .env.

Next, change container_name and Docker network name in docker-compose.yml as you wish.

docker-compose up -d
docker exec -it codeigniter_app chown -R www-data:www-data /var/www/writable
docker exec -it codeigniter_app chmod -R 775 /var/www/writable

Then, open localhost:8080 and make magic!

How to use composer or CLI

CLI Spark:

docker exec -it codeigniter_app php spark db:table

Composer:

docker exec -it codeigniter_app composer -v

If you want MySQL - change PostgreSQL in container db to MySQL and config database.default.DBDriver = 'MySQLi' and database.default.port = 3306 in .env. If you have an errors in build - fix packages in Dockerfile.

Note!

The solution is provided “as is” and the author bears no responsibility if something does not work. You have every right to make a fork and modify the code as you need!

Links