Files
2026-09-01 10:46:29 -03:00

97 lines
2.6 KiB
PHP
Executable File

<?php
/**
* SysCMS - Content Management System
*
* Copyright (c) 2025 Marco Costa
* All rights reserved.
*
* Author: Marco Costa
* Email: contato@syspanel.com.br
* Project: SysCMS
*
* This software is licensed, not sold.
* Permission is granted to use this software
* subject to the terms of the SysCMS Commercial License.
*
* Redistribution, sublicensing, resale, or
* disclosure of this software, in whole or in part,
* is strictly prohibited without prior written permission.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
*/
use DI\ContainerBuilder;
use Psr\Container\ContainerInterface;
// The environment helper is loaded via composer autoload (app/helpers.php)
return [
// Database configuration
'database' => function (ContainerInterface $c) {
return get_db_config();
},
// Application configuration
'app' => function (ContainerInterface $c) {
return get_app_config();
},
// Session configuration
'session' => function (ContainerInterface $c) {
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env_int('SESSION_LIFETIME', 120),
];
},
// Mail configuration
'mail' => function (ContainerInterface $c) {
return get_mail_config();
},
// JWT configuration
'jwt' => function (ContainerInterface $c) {
return [
'secret' => env('JWT_SECRET', 'your_jwt_secret_key'),
'ttl' => env_int('JWT_TTL', 60),
];
},
// Cache configuration
'cache' => function (ContainerInterface $c) {
return [
'driver' => env('CACHE_DRIVER', 'file'),
'prefix' => '',
'path' => __DIR__ . '/../cache',
];
},
// Redis configuration
'redis' => function (ContainerInterface $c) {
return [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD'),
'port' => env_int('REDIS_PORT', 6379),
'database' => env_int('REDIS_DB', 0),
];
},
// File upload configuration
'upload' => function (ContainerInterface $c) {
return [
'directory' => env('UPLOADS_DIR', dirname(__DIR__) . '/storage/uploads'),
'max_size' => env('PHP_UPLOAD_MAX_FILESIZE', '256M'),
'max_files' => env_int('PHP_MAX_FILE_UPLOADS', 50),
];
},
// Logging configuration
'logging' => function (ContainerInterface $c) {
return [
'channel' => env('LOG_CHANNEL', 'stack'),
'level' => env('LOG_LEVEL', 'debug'),
'path' => __DIR__ . '/../logs',
];
},
];