That's an interesting idea, I'll see if I can do something like that as a workaround...
Thanks! On Wed, Feb 14, 2024 at 8:33 AM Steinar Bang <[email protected]> wrote: > >>>>> Ryan Moquin <[email protected]>: > > > I've struggling figuring out how I can use environment variables to add > > feature repositories and also boot features via environment variables > > before starting Karaf.. I was looking at the documentation and I tried > the > > example for adding a feature repository, but doesn't appear it was added, > > do I have the wrong idea, or is there something specific that is needed > in > > order for this to work? > > I haven't done exactly what you're doing, but I've done something > similar in my docker images: > > 1. In the Dockerfile I replace the etc/org.apache.karaf.features.cfg > file with a file that adds my extra startup feature and add a new > file containing a pax jdbc config DataSource configuration > > https://github.com/steinarb/sonar-collector/blob/master/docker/docker/Dockerfile > > 2. In the etc/org.apache.karaf.features.cfg I see that I actually use > an environment variable for one feature, that defaults to > "postgresql" if the variable isn't set (the enviroment variable her > is JDBC_DRIVER_FEATURE) > > https://github.com/steinarb/sonar-collector/blob/master/docker/docker/org.apache.karaf.features.cfg#L53 > > 3. The pax jdbc config DataSource configuration has enviroment > variables with defaults for JDBC_URL, JDBC_USER and JDBC_PASSWORD > >
