This setup is used to run Laravel and CodeIgniter projects locally using Podman.
podman-compose upIf you don’t have a Podman machine yet, initialize and start it:
podman machine init
podman machine start
podman-compose up -d --build- Place your
.envfile inside the CodeIgniter project directory - Update your
hooks.phpto correctly load .env
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../..');Update config.php in CodeIgniter:
$config['sess_save_path'] = '/tmp';# don't use http://localhost:8000
$request = curl_init('http://laravel:80' . '/api/login');chmod -R 777 storage bootstrap/cachechmod -R 777 /tmp
chmod -R 777 application/logs
chmod -R 777 application/cachepodman exec -it {CONTAINER_NAME} bashpodman exec -i {DB_CONTAINER_NAME} \
mysql -u {DB_USER} -proot --force {DB_NAME} \
< app/{PROJECT_FOLDER}/{SQL_FILE}.sql
podman-compose down && \
podman-compose up --build