diff --git a/.dockerignore b/.dockerignore index 5c37160..ad1ad9c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,2 @@ -.idea/ vendor/ .phpunit.cache/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Php-Template.iml b/.idea/Php-Template.iml new file mode 100644 index 0000000..ace71b3 --- /dev/null +++ b/.idea/Php-Template.iml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeception.xml b/.idea/codeception.xml new file mode 100644 index 0000000..330f2dd --- /dev/null +++ b/.idea/codeception.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml new file mode 100644 index 0000000..4ea72a9 --- /dev/null +++ b/.idea/copilot.data.migration.agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask.xml b/.idea/copilot.data.migration.ask.xml new file mode 100644 index 0000000..7ef04e2 --- /dev/null +++ b/.idea/copilot.data.migration.ask.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml new file mode 100644 index 0000000..1f2ea11 --- /dev/null +++ b/.idea/copilot.data.migration.ask2agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.edit.xml b/.idea/copilot.data.migration.edit.xml new file mode 100644 index 0000000..8648f94 --- /dev/null +++ b/.idea/copilot.data.migration.edit.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..d502796 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..469f660 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml new file mode 100644 index 0000000..fdad0d5 --- /dev/null +++ b/.idea/php-test-framework.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..7b36a14 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/phpspec.xml b/.idea/phpspec.xml new file mode 100644 index 0000000..33107fd --- /dev/null +++ b/.idea/phpspec.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml new file mode 100644 index 0000000..4f8104c --- /dev/null +++ b/.idea/phpunit.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..1aefb10 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + "associatedIndex": 8 +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1760539332536 + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config.php b/config.php index 38739d0..89e4c00 100644 --- a/config.php +++ b/config.php @@ -8,7 +8,7 @@ return [ * The server configuration. */ 'server' => [ - 'port' => Env::get('HTTP_PORT', 9501, 'int'), + 'port' => Env::get('HTTP_PORT', 9501, 'int'), 'dev_mode' => Env::get('DEV_MODE', false, 'bool'), ], @@ -21,9 +21,15 @@ return [ 'database' => Env::get('DB_DATABASE', 'siteworxpro'), 'username' => Env::get('DB_USERNAME', 'siteworxpro'), 'password' => Env::get('DB_PASSWORD', 'password'), + 'port' => Env::get('DB_PORT', 5432, 'int'), + 'charset' => Env::get('DB_CHARSET', 'utf8'), + 'collation' => Env::get('DB_COLLATION', 'utf8_unicode_ci'), + 'prefix' => Env::get('DB_PREFIX', ''), + 'options' => [ + // Add any additional PDO options here + ], ], - 'cors' => [ 'allowed_origins' => Env::get('CORS_ALLOWED_ORIGINS', 'localhost:3000'), 'allow_credentials' => Env::get('CORS_ALLOW_CREDENTIALS', true, 'bool'), @@ -34,5 +40,6 @@ return [ 'host' => Env::get('REDIS_HOST', 'localhost'), 'port' => Env::get('REDIS_PORT', 6379, 'int'), 'database' => Env::get('REDIS_DATABASE', 0, 'int'), + 'password' => Env::get('REDIS_PASSWORD'), ] -]; \ No newline at end of file +]; diff --git a/src/Server.php b/src/Server.php index acb7d03..22a39d3 100644 --- a/src/Server.php +++ b/src/Server.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Siteworxpro\App; use Illuminate\Container\Container; +use Illuminate\Database\Capsule\Manager; use Illuminate\Support\ServiceProvider; use League\Route\Http\Exception\MethodNotAllowedException; use League\Route\Http\Exception\NotFoundException; @@ -120,18 +121,8 @@ class Server */ public function bootModelCapsule(): void { - $capsule = new \Illuminate\Database\Capsule\Manager(); - $capsule->addConnection([ - 'driver' => Config::get('db.driver'), - 'host' => Config::get('db.host'), - 'database' => Config::get('db.database'), - 'username' => Config::get('db.username'), - 'password' => Config::get('db.password'), - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - ]); - + $capsule = new Manager(); + $capsule->addConnection(Config::get('db')); $capsule->setAsGlobal(); $capsule->bootEloquent(); } diff --git a/src/Services/ServiceProviders/RedisServiceProvider.php b/src/Services/ServiceProviders/RedisServiceProvider.php index 064d050..c22b5a5 100644 --- a/src/Services/ServiceProviders/RedisServiceProvider.php +++ b/src/Services/ServiceProviders/RedisServiceProvider.php @@ -18,6 +18,7 @@ class RedisServiceProvider extends ServiceProvider 'host' => Config::get('redis.host'), 'port' => Config::get('redis.port'), 'database' => Config::get('redis.database'), + 'password' => Config::get('redis.password'), ]); }); }