Commit ad817a84 authored by Rafael Chaves Freitas's avatar Rafael Chaves Freitas

configuração do redis como handler de sessão e limite de utilização de memória

parent ba2b19b6
Pipeline #10131 passed with stages
in 47 seconds
<?php
use MapasCulturais\i;
if (env('REDIS_CACHE', false)) {
$redis = new \Redis();
$redis->connect('redis');
$cache = new \Doctrine\Common\Cache\RedisCache;
$cache->setRedis($redis);
$redis = new \Redis();
$redis->connect('redis');
$mscache = new \Doctrine\Common\Cache\RedisCache;
$mscache->setRedis($redis);
} else {
$cache = new \Doctrine\Common\Cache\ApcuCache;
$mscache = new \Doctrine\Common\Cache\ApcuCache;
}
return [
'app.cache' => $cache,
'app.mscache' => $mscache,
'app.siteName' => env('SITE_NAME', 'SpCultura'),
'app.siteDescription' => env('SITE_DESCRIPTION', 'O SP Cultura é a plataforma livre, gratuita e colaborativa de mapeamento da Secretaria Municipal de Cultura de São Paulo sobre o cenário cultural paulistano.'),
......
memory_limit = 512M
\ No newline at end of file
session.save_handler = redis
\ No newline at end of file
......@@ -7,4 +7,6 @@ COPY compose/production/config.d /var/www/html/protected/application/conf/config
COPY themes /var/www/html/protected/application/themes
COPY plugins /var/www/html/protected/application/plugins
COPY compose/common/php-ini.d /usr/local/etc/php/conf.d
RUN curl https://raw.githubusercontent.com/opauth/facebook/master/FacebookStrategy.php > /var/www/html/protected/application/plugins/MultipleLocalAuth/Facebook/FacebookStrategy.php
......@@ -54,6 +54,7 @@ services:
- ./compose/common/extras/termos-e-condicoes-inciso2.php:/var/www/html/protected/application/plugins/AldirBlanc/views/aldirblanc/termos-e-condicoes-inciso2.php
environment:
- REDIS_CACHE=1
- POSTGRES_PASSWORD=mapas
- POSTGRES_USER=mapas
- POSTGRES_DB=mapas
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment