adding fallback DATABASE_URL to avoid connecting to the db during

cache:warmup
This commit is contained in:
Ryan Weaver
2017-11-16 15:36:37 +02:00
parent f446c92fbf
commit 61ca864c15
2 changed files with 15 additions and 2 deletions
@@ -1,8 +1,19 @@
parameters:
# update these for your app
doctrine.database_server: mysql
doctrine.server_version: 5.7
# adds a fallback URL if the env var is not set
# this is useful to allow you to run cache:warmup
# even when your environment variables don't yet exist
# you should not need to change this value
DATABASE_URL: '%doctrine.database_server%://'
doctrine:
dbal:
# With Symfony 3.3, remove the `resolve:` prefix
url: '%env(resolve:DATABASE_URL)%'
server_version: 5.7
server_version: '%doctrine.server_version%'
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
@@ -3,4 +3,6 @@
<bg=blue;fg=white> </>
* Modify your DATABASE_URL config in <fg=green>.env</>
* Check your server_version in <fg=green>config/packages/doctrine.yaml</>
* Configure the <fg=green>database_server</> (mysql) and
<fg=green>server_version</fg> (5.7) in <fg=green>config/packages/doctrine.yaml</>