Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENV vars logic] Move env specific var definitions in the parameters.dist.yml #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ assetic:
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
port: '%mailer_port%'
username: '%mailer_user%'
password: '%mailer_password%'
spool: { type: memory }
Expand Down
35 changes: 3 additions & 32 deletions app/config/default_parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ parameters:

# Setting for mail system, used by SwiftMailer
mailer_host: '%env(MAILER_HOST)%'
mailer_port: '%env(MAILER_PORT)%'
mailer_user: '%env(MAILER_USER)%'
mailer_password: '%env(MAILER_PASSWORD)%'

Expand All @@ -35,8 +36,8 @@ parameters:

# Cache DSN, see app/config/services/cache.yml for examples:
cache_dsn: '%env(CACHE_DSN)%'
# Cache namespace prefix for use with Redis/Memcached, 'ez' by default.

# Cache namespace prefix for use with Redis/Memcached, 'ez' by default.
# For further info incl alternatives for "blue/green deployment" and multi repo installs, see: app/config/cache_pool/*.yml
cache_namespace: '%env(CACHE_NAMESPACE)%'

Expand All @@ -55,36 +56,6 @@ parameters:
ez_recommendation.default.yoochoose.license_key: '%env(RECOMMENDATIONS_LICENSE_KEY)%'
ez_recommendation.default.server_uri: '%env(PUBLIC_SERVER_URI)%'

# Fallback values for when environment variables do not exist

env(MAILER_HOST): 127.0.0.1
env(MAILER_USER): ~
env(MAILER_PASSWORD): ~

env(SEARCH_ENGINE): legacy

env(SOLR_DSN): http://localhost:8983/solr
env(SOLR_CORE): collection1

env(LOG_PATH): "%kernel.logs_dir%/%kernel.environment%.log"

env(CACHE_POOL): "cache.app"

env(CACHE_DSN): localhost

env(CACHE_NAMESPACE): ez

env(HTTPCACHE_PURGE_SERVER): "http://localhost:80"

env(HTTPCACHE_DEFAULT_TTL): 86400

env(SESSION_SAVE_PATH): '%kernel.project_dir%/var/sessions/%kernel.environment%'

env(RECOMMENDATIONS_CUSTOMER_ID): ~
env(RECOMMENDATIONS_LICENSE_KEY): ~
env(PUBLIC_SERVER_URI): ~


# Compile time handlers
## These are defined at compile time, and hence can't be set at runtime using env()
## app/config/env/generic.php takes care about letting you set them by env variables
Expand Down
30 changes: 30 additions & 0 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,33 @@ parameters:
env(DATABASE_NAME): ezplatform
env(DATABASE_USER): root
env(DATABASE_PASSWORD):

# Fallback values for when environment variables do not exist

env(MAILER_HOST): 127.0.0.1
env(MAILER_PORT): ~
env(MAILER_USER): ~
env(MAILER_PASSWORD): ~

env(SEARCH_ENGINE): legacy

env(SOLR_DSN): http://localhost:8983/solr
env(SOLR_CORE): collection1

env(LOG_PATH): "%kernel.logs_dir%/%kernel.environment%.log"

env(CACHE_POOL): "cache.app"

env(CACHE_DSN): localhost

env(CACHE_NAMESPACE): ez

env(HTTPCACHE_PURGE_SERVER): "http://localhost:80"

env(HTTPCACHE_DEFAULT_TTL): 86400

env(SESSION_SAVE_PATH): '%kernel.project_dir%/var/sessions/%kernel.environment%'

env(RECOMMENDATIONS_CUSTOMER_ID): ~
env(RECOMMENDATIONS_LICENSE_KEY): ~
env(PUBLIC_SERVER_URI): ~