FastCGI
This commit is contained in:
@ -4,7 +4,7 @@ use Psr\Container\ContainerInterface;
|
||||
return [
|
||||
Incoviba\Service\Login::class => function(ContainerInterface $container) {
|
||||
$client = new GuzzleHttp\Client([
|
||||
'base_uri' => $container->get('API_URL'),
|
||||
'base_uri' => $container->has('API_URL') ? $container->get('API_URL') : 'http://proxy/api',
|
||||
'headers' => [
|
||||
'Authorization' => [
|
||||
'Bearer ' . md5($container->get('API_KEY'))
|
||||
@ -36,8 +36,15 @@ return [
|
||||
},
|
||||
Psr\Http\Client\ClientInterface::class => function(ContainerInterface $container) {
|
||||
return new GuzzleHttp\Client([
|
||||
'base_uri' => $container->get('API_URL'),
|
||||
'base_uri' => $container->has('API_URL') ? $container->get('API_URL') : 'http://proxy/api',
|
||||
'handler' => $container->get(GuzzleHttp\HandlerStack::class),
|
||||
]);
|
||||
}
|
||||
},
|
||||
Incoviba\Service\FastCGI::class => function(ContainerInterface $container) {
|
||||
return new Incoviba\Service\FastCGI(
|
||||
$container->has('SOCKET_HOST') ? $container->get('SOCKET_HOST') : 'web',
|
||||
$container->has('SOCKET_PORT') ? $container->get('SOCKET_PORT') : 9000,
|
||||
$container->has('SOCKET_ROOT') ? $container->get('SOCKET_ROOT') : '/code/public/index.php'
|
||||
);
|
||||
},
|
||||
];
|
||||
|
@ -5,8 +5,8 @@ return [
|
||||
Predis\ClientInterface::class => function(ContainerInterface $container) {
|
||||
$options = [
|
||||
'scheme' => 'tcp',
|
||||
'host' => $container->get('REDIS_HOST'),
|
||||
'port' => $container->get('REDIS_PORT')
|
||||
'host' => $container->has('REDIS_HOST') ? $container->get('REDIS_HOST') : 'redis',
|
||||
'port' => $container->has('REDIS_PORT') ? $container->get('REDIS_PORT') : 6379
|
||||
];
|
||||
if ($container->has('REDIS_USER')) {
|
||||
$options['username'] = $container->get('REDIS_USER');
|
||||
|
Reference in New Issue
Block a user