Giter VIP home page Giter VIP logo

sitture / env-config Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 15.0 319 KB

A simple utility to manage environment configs in Java-based projects by merging .properties files and environment variables overrides.

License: MIT License

Java 100.00%
bdd config configuration configuration-files configuration-management continuous-deployment continuous-integration env-loader environment environment-manager environment-variables environment-vars hacktoberfest java keepass overridden properties secrets secrets-manager sitture

env-config's People

Contributors

dependabot[bot] avatar drarko avatar gvn03 avatar haroon-sheikh avatar mark-rand avatar richhesk avatar simpslandyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

env-config's Issues

Update config.dir to accept relative and absolute paths

Prerequisites

Put an x in all the boxes that apply

  • Are you running the latest version?
  • Did you perform a cursory search?
  • Have you a detailed log to share?

For more information, see the CONTRIBUTING guide.

Description

[Description of the bug or feature]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions: [What version of JDK/JRE and other tools are using]

Change the default env var.

Currently, it listens for ENV var to decide which environment but it's too generic.

  • Change ENV to CONFIG_ENV
  • Change ENV_DIR to CONFIG_DIR

Investigate a solution for working with KDBX3 and KDBX4

Problem

EnvConfig is currently using the library below for working with keepass databases, however the library is no longer maintained and deprecated.

<dependency>
  <groupId>de.slackspace</groupId>
  <artifactId>openkeepass</artifactId>
  <version>${openkeepass.version}</version>
</dependency>

Tasks

  • Investigate if there's another library that can be replaced with
  • Should be able to work with both KDBX3 and KDBX4 versions.

Can't find the config dir in aws lambda environment

Prerequisites

Put an x in all the boxes that apply

  • Are you running the latest version?
  • Did you perform a cursory search?
  • Have you a detailed log to share?

For more information, see the CONTRIBUTING guide.

Description

When I deploy in aws lambda, I get a config dir not found error. Locally, the code works fine.

Expected behavior: [What you expected to happen]
The library tries to locate the config dir in /var/task/config because it's the root in the lambda environment, but can't find it because it seems like the project root is not the same as lambda root

Actual behavior: [What actually happened]
The lib finds the dir

Versions: [What version of JDK/JRE and other tools are using]
Java 8

This is more like a plea for guidance than an issue. Has anybody deployed on lambda? If so, what did you set you CONFIG_DIR environment variable to?

Relevant log:
[2021-04-30 07:54:45.374] <5e08bf1a-dee9-41a2-90fb-3f1503d7107c>
DEBUG c.g.s.e.c.ConfigLoader - config.dir set to 'config'

ERROR c.a.a.BaseFunction - Error: 1fa9abe4-779e-42b9-8b21-69dcefe29642
com.github.sitture.env.config.ConfigException: '/var/task/config/DEV' does not exist or not a valid config directory!
at com.github.sitture.env.config.ConfigLoader.getConfigFiles(ConfigLoader.java:85)
at com.github.sitture.env.config.ConfigLoader.loadFileConfigurations(ConfigLoader.java:144)
at com.github.sitture.env.config.ConfigLoader.loadConfigurations(ConfigLoader.java:123)
at com.github.sitture.env.config.EnvConfig.(EnvConfig.java:21)
at com.github.sitture.env.config.EnvConfig.getConfig(EnvConfig.java:32)
at com.github.sitture.env.config.EnvConfig.get(EnvConfig.java:132)

Add a has property check.

Add EnvConfig.has("property") check to return a boolean.

  • Add a has function
  • Update Read Me docs
  • Update Changelog

Unable to find the path of keepass file

Prerequisites

Put an x in all the boxes that apply

  • Are you running the latest version?
  • Did you perform a cursory search?
  • Have you a detailed log to share?

For more information, see the CONTRIBUTING guide.

Description

This is only the issue running on windows.

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions: [What version of JDK/JRE and other tools are using]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.