decomposition de la connection à la bdd

This commit is contained in:
2020-05-11 16:52:31 +02:00
parent 4374f1fd4c
commit b4f9ebf327
2 changed files with 8 additions and 2 deletions

View File

@@ -33,7 +33,10 @@ APP_ENV=PROD
APP_CRON=false APP_CRON=false
# BDD # BDD
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7 DATABASE_NAME=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
# If APP_AUTH = CAS # If APP_AUTH = CAS
CAS_HOST= CAS_HOST=

View File

@@ -1,6 +1,9 @@
doctrine: doctrine:
dbal: dbal:
url: '%env(resolve:DATABASE_URL)%' dbname: '%env(resolve:DATABASE_NAME)%'
user: '%env(resolve:DATABASE_USER)%'
password: '%env(resolve:DATABASE_PASSWORD)%'
host: '%env(resolve:DATABASE_HOST)%'
# IMPORTANT: You MUST configure your server version, # IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file) # either here or in the DATABASE_URL env var (see .env file)