-
-
Notifications
You must be signed in to change notification settings - Fork 11
Installation
One-sentence purpose: get ci4ms from a fresh clone/composer install to a running site, via either the web installer or the one-command CLI setup.
- PHP 8.2 or newer, with the
intl,json,mbstring,gd,curl, andopensslextensions enabled - Composer 2.5+
- MySQL / MariaDB (or another CodeIgniter 4-supported database driver)
- Writable directories:
writable/,public/uploads/, and optionallypublic/templates/ -
Optional: Redis +
ext-redis(phpredis), only if you enable the realtime notifications feature (off by default)
Fresh project (recommended):
composer create-project ci4-cms-erp/ci4ms myproject
cd myprojectClone an existing repository:
git clone <repo-url> ci4ms
cd ci4ms
composer installcp env .envUpdate at least these settings in .env:
app.baseURL-
database.default.*(hostname, database, username, password, driver, prefix, port) - Optionally:
cookie.*,honeypot.*,security.*
cp app/Config/DefaultRoutes.php app/Config/Routes.phpThis step is required before either installation path below — app/Config/Routes.php does not ship pre-populated in the repository.
Open /install in your browser and follow the wizard. It will:
- Create and configure
.env(including generating an encryption key) - Run all database migrations
- Insert default data (settings, languages, permission groups)
- Create the initial administrator account
- Regenerate
app/Config/Routes.php - Create required runtime directories (
writable/backups,public/media/.tmb,public/media/.trash)
The installer writes CI_ENVIRONMENT = production into .env as part of this process, and shows a one-time DevGate credential disclosure page before redirecting you to the homepage — see Security Hardening for what both of these mean and why you should save that password immediately.
php spark ci4ms:setupThis single command runs all migrations, seeds default data (modules, permissions, sample content), and creates the initial administrator account — no separate migrate or seed commands are needed. This is the path used in Docker/CI environments where a browser-based installer isn't practical.
php spark serveThe frontend is served at the site root; the backend admin panel is available at /backend.
cp env .env
cp app/Config/DefaultRoutes.php app/Config/Routes.php
docker compose up -d --build
docker exec ci4ms_app composer install
docker exec ci4ms_app php spark ci4ms:setupFull Docker instructions, including service ports and the required hostname = db database setting, are in DOCKER_SETUP.md.
- If you skip step 3 (copying
Routes.php), the site will not route correctly. - Known past installer regressions worth being aware of (already fixed, see CHANGELOG.md): a web-installer 404 on the configuration step, and a CLI setup failure on the
users.profileIMGmigration under MySQL/MariaDB strict mode. If you hit an installer failure, check you are on a current release before filing a report.
- PHP 8.2 veya üzeri,
intl,json,mbstring,gd,curl,openssluzantıları etkin - Composer 2.5+
- MySQL / MariaDB (veya CodeIgniter 4'ün desteklediği başka bir veritabanı sürücüsü)
- Yazılabilir dizinler:
writable/,public/uploads/, isteğe bağlı olarakpublic/templates/ -
İsteğe bağlı: Redis +
ext-redis(phpredis) — yalnızca gerçek zamanlı bildirim özelliğini açarsanız gerekir (varsayılan kapalı)
Yeni proje (önerilen):
composer create-project ci4-cms-erp/ci4ms myproject
cd myprojectMevcut repoyu klonlayın:
git clone <repo-url> ci4ms
cd ci4ms
composer installcp env .env.env içinde en az şu ayarları güncelleyin:
app.baseURL-
database.default.*(host, veritabanı adı, kullanıcı adı, şifre, driver, prefix, port) - İsteğe bağlı:
cookie.*,honeypot.*,security.*
cp app/Config/DefaultRoutes.php app/Config/Routes.phpBu adım aşağıdaki iki kurulum yolundan önce de gereklidir — app/Config/Routes.php repoda hazır gelmez.
Tarayıcınızda /install adresini açın ve sihirbazı takip edin. Sihirbaz şunları yapar:
-
.envdosyasını oluşturur ve yapılandırır (şifreleme anahtarı üretimi dahil) - Tüm veritabanı migration'larını çalıştırır
- Varsayılan verileri ekler (ayarlar, diller, izin grupları)
- İlk yönetici hesabını oluşturur
-
app/Config/Routes.phpdosyasını yeniden üretir - Gerekli çalışma zamanı dizinlerini oluşturur (
writable/backups,public/media/.tmb,public/media/.trash)
Installer bu süreçte .env dosyasına CI_ENVIRONMENT = production yazar ve anasayfaya yönlendirmeden önce tek seferlik bir DevGate kimlik bilgisi açıklama sayfası gösterir — bunların ne anlama geldiği ve o şifreyi neden hemen kaydetmeniz gerektiği için Güvenlik Sertleştirme sayfasına bakın.
php spark ci4ms:setupBu tek komut tüm migration'ları çalıştırır, varsayılan verileri (modüller, izinler, örnek içerik) ekler ve ilk yönetici hesabını oluşturur — ayrıca migrate veya seed komutlarına gerek yoktur. Bu yol, tarayıcı tabanlı bir installer'ın pratik olmadığı Docker/CI ortamlarında kullanılır.
php spark serveÖn yüz site kökünde, backend yönetim paneli ise /backend adresinde sunulur.
cp env .env
cp app/Config/DefaultRoutes.php app/Config/Routes.php
docker compose up -d --build
docker exec ci4ms_app composer install
docker exec ci4ms_app php spark ci4ms:setupServis portları ve gerekli hostname = db veritabanı ayarı dahil tam Docker talimatları DOCKER_SETUP.md içindedir.
-
- adımı (
Routes.phpkopyalama) atlarsanız site doğru şekilde route edilmez.
- adımı (
- Bilinen geçmiş installer regresyonları (zaten düzeltildi, bkz. CHANGELOG.md): web installer'ın yapılandırma adımında 404 vermesi ve CLI kurulumunun
users.profileIMGmigration'ında MySQL/MariaDB strict mode nedeniyle başarısız olması. Bir installer hatasıyla karşılaşırsanız, rapor açmadan önce güncel bir sürümde olduğunuzu kontrol edin.