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

Add .env File Support #10

Open
iquzart opened this issue Mar 6, 2025 · 0 comments
Open

Add .env File Support #10

iquzart opened this issue Mar 6, 2025 · 0 comments

Comments

@iquzart
Copy link
Owner

iquzart commented Mar 6, 2025

Add .env File Support for Configuration Overrides

Description:
To make the project more flexible and user-friendly, we should add support for an optional .env file. This file will allow users to override default configurations (e.g., database credentials, versions, etc.) without modifying the Makefile directly. This is particularly useful for local development and testing, where users may need to customize settings.

Why is this needed?

  • Currently, all configurations are hardcoded in the Makefile, which makes it difficult to customize settings without editing the file.
  • Using a .env file is a standard practice for managing environment-specific configurations.
  • It simplifies the process of overriding defaults (e.g., database credentials, versions, etc.) without requiring changes to the Makefile.

Requirements:

  1. Load .env File:

    • The Makefile should check for the existence of a .env file in the root directory.
    • If the .env file exists, load its variables and override the default values in the Makefile.
  2. Environment Variable Precedence:

    • Environment variables set in the shell should take precedence over values in the .env file.
    • The .env file should take precedence over default values in the Makefile.
  3. Documentation:

    • Update the README.md to explain how to use the .env file for configuration overrides.
    • Provide an example .env file with all supported variables.
  4. Example .env File:

    • Include a .env.example file in the repository with all supported variables and their default values. This will serve as a template for users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant