Skip to content

Feature proposal: .env.local and .env.[environment][.local] #257

Closed
@mandrewcito

Description

@mandrewcito

Hi,

Is there a way to deal with local configurations or environment dependent configurations?.

I will explain my idea:

On the process of developing an app, You would have a .env file stored on the version control with a default options (a template with default values). But when you are on the development process you need a .env.local. Why? becouse you need to store your DB conection string and other config values related with your local environment. Next, on your publishing/test/stage scenario your connection strings will change so you will need a different environment file:

IMO the load secuence of the .env will be the follwing:

On development scenario:

  • .env // default options
  • .env.development // common development options
  • .env.local

On the other scenarios:

  • .env
  • .env.[staging/production]

Is there a way to configure this behaivour on the library ? if is not do you have plans to add this behaiour? I ask this because i can add this functionality to the library and make a PR if you consider it useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions