Where should the database and mail parameters be stored in a Symfony2 app?
Posted
by
Songo
on Programmers
See other posts from Programmers
or by Songo
Published on 2013-10-30T12:32:37Z
Indexed on
2013/10/30
16:11 UTC
Read the original article
Hit count: 283
In the default folder structure for a Symfony2 project the database and mail server credentials are stored in parameters.yml
file inside ProjectRoot/app/config/parameters.yml
with these default values:
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: symfony
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
During development we change these parameters to the development database and mail servers. This file is checked into the source code repository.
The problem is when we want to deploy to the production server. We are thinking about automating the deployment process by checking out the project from git and deploy it to the production server.
The thing is that our project manager has to manually update these parameters after each update. The production database and mail servers parameters are confidential and only our project manager knows them.
I need a way to automate this step and suggestion on where to store the production parameters until they are applied?
© Programmers or respective owner