piwikpro/env-params-builder-bundle

Helps to build parameters.yml file based on environment variables

0.1.0 2016-12-05 12:58 UTC

This package is not auto-updated.

Last update: 2019-10-14 08:24:52 UTC


README

Build Status

Bundle helps to create parameters.yml file based on environment variables. It's really popular scenario especially when running a symfony based application using Docker.

How to install ?

Bundle can be easily installed using composer:

composer require "piwikpro/env-params-builder-bundle:~0.1"

Next, you have to register the bundle in AppKernel:

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        return [
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            ...
            new \PiwikPRO\EnvParamsBuilderBundle\PiwikPROEnvParamsBuilderBundle()
            ...
        ];
    }
}

That's all. Now to create parameters.yml file use following command:

php bin/console env-params:build > app/config/parameters.yml

Configuration

By default, bundle is looking for symfony specific environment variables (read more about it here), but it's possible to change it:

env_params_builder:
    prefix: "MY_PREFIX" # by default SYMFONY
    delimiter: "-" # by default __

Change-log

  • 0.1.0
    • initial version