redis session
This commit is contained in:
parent
7fdf41aac8
commit
f97bac6e5e
4
.env
4
.env
|
@ -8,6 +8,10 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
||||||
# Database
|
# Database
|
||||||
DATABASE_URL="postgresql://symfony:ChangeMe@127.0.0.1:5432/app?serverVersion=13&charset=utf8"
|
DATABASE_URL="postgresql://symfony:ChangeMe@127.0.0.1:5432/app?serverVersion=13&charset=utf8"
|
||||||
|
|
||||||
|
# Redis Session
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
# Mailer
|
# Mailer
|
||||||
MAILER_METHOD=smtp
|
MAILER_METHOD=smtp
|
||||||
MAILER_DSN=smtp://127.0.0.1:1025
|
MAILER_DSN=smtp://127.0.0.1:1025
|
||||||
|
|
|
@ -7,7 +7,7 @@ framework:
|
||||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||||
# Remove or comment this section to explicitly disable session support.
|
# Remove or comment this section to explicitly disable session support.
|
||||||
session:
|
session:
|
||||||
handler_id: null
|
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler
|
||||||
name: '%env(APP_ALIAS)%'
|
name: '%env(APP_ALIAS)%'
|
||||||
gc_probability: null
|
gc_probability: null
|
||||||
cookie_secure: auto
|
cookie_secure: auto
|
||||||
|
|
|
@ -113,6 +113,17 @@ services:
|
||||||
resource: '../src/Controller'
|
resource: '../src/Controller'
|
||||||
tags: ['controller.service_arguments']
|
tags: ['controller.service_arguments']
|
||||||
|
|
||||||
|
Redis:
|
||||||
|
class: Redis
|
||||||
|
calls:
|
||||||
|
- connect:
|
||||||
|
- '%env(REDIS_HOST)%'
|
||||||
|
- '%env(int:REDIS_PORT)%'
|
||||||
|
|
||||||
|
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler:
|
||||||
|
arguments:
|
||||||
|
- '@Redis'
|
||||||
|
|
||||||
App\EventListener\AllSubscriber:
|
App\EventListener\AllSubscriber:
|
||||||
public: true
|
public: true
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -1,8 +1,19 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
database:
|
redis:
|
||||||
|
image: redis:4.0
|
||||||
|
container_name: redis
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Paris
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|
||||||
|
postgres:
|
||||||
image: postgres:${POSTGRES_VERSION:-13}-alpine
|
image: postgres:${POSTGRES_VERSION:-13}-alpine
|
||||||
|
container_name: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: ${POSTGRES_DB:-app}
|
POSTGRES_DB: ${POSTGRES_DB:-app}
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe}
|
||||||
|
@ -14,12 +25,14 @@ services:
|
||||||
|
|
||||||
mailer:
|
mailer:
|
||||||
image: schickling/mailcatcher
|
image: schickling/mailcatcher
|
||||||
|
container_name: mailer
|
||||||
ports:
|
ports:
|
||||||
- 1025:1025
|
- 1025:1025
|
||||||
- 1080:1080
|
- 1080:1080
|
||||||
|
|
||||||
mercure:
|
mercure:
|
||||||
image: dunglas/mercure
|
image: dunglas/mercure
|
||||||
|
container_name: mercure
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
@ -35,6 +48,38 @@ services:
|
||||||
- mercure_data:/data
|
- mercure_data:/data
|
||||||
- mercure_config:/config
|
- mercure_config:/config
|
||||||
|
|
||||||
|
openldap:
|
||||||
|
image: osixia/openldap:1.5.0
|
||||||
|
container_name: openldap
|
||||||
|
environment:
|
||||||
|
LDAP_LOG_LEVEL: "256"
|
||||||
|
LDAP_ORGANISATION: "nineskeletor"
|
||||||
|
LDAP_DOMAIN: "nine.fr"
|
||||||
|
LDAP_ADMIN_PASSWORD: "admin"
|
||||||
|
LDAP_CONFIG_PASSWORD: "config"
|
||||||
|
LDAP_READONLY_USER: "true"
|
||||||
|
LDAP_READONLY_USER_USERNAME: "readonly"
|
||||||
|
LDAP_READONLY_USER_PASSWORD: "readonly"
|
||||||
|
LDAP_TLS: "false"
|
||||||
|
volumes:
|
||||||
|
- /var/lib/ldap
|
||||||
|
- /etc/ldap/slapd.d
|
||||||
|
- /container/service/slapd/assets/certs/
|
||||||
|
ports:
|
||||||
|
- "389:389"
|
||||||
|
- "636:636"
|
||||||
|
|
||||||
|
phpldapadmin:
|
||||||
|
image: osixia/phpldapadmin:latest
|
||||||
|
container_name: phpldapadmin
|
||||||
|
environment:
|
||||||
|
PHPLDAPADMIN_LDAP_HOSTS: "openldap"
|
||||||
|
PHPLDAPADMIN_HTTPS: "false"
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
depends_on:
|
||||||
|
- openldap
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db-data:
|
db-data:
|
||||||
mercure_data:
|
mercure_data:
|
||||||
|
|
|
@ -237,7 +237,6 @@ class SecurityController extends AbstractController
|
||||||
"client_secret" => $this->getParameter("oauthClientsecret"),
|
"client_secret" => $this->getParameter("oauthClientsecret"),
|
||||||
];
|
];
|
||||||
$response=$this->apiservice->run("POST",$apiurl,$query);
|
$response=$this->apiservice->run("POST",$apiurl,$query);
|
||||||
dump($response);
|
|
||||||
return $this->render('Home/home.html.twig',[
|
return $this->render('Home/home.html.twig',[
|
||||||
"useheader"=>true,
|
"useheader"=>true,
|
||||||
"usemenu"=>true,
|
"usemenu"=>true,
|
||||||
|
|
Loading…
Reference in New Issue