You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Luc1412 (via GitHub)" <gi...@apache.org> on 2025/09/16 16:24:31 UTC
[D] Best way of storing secrets in Karavan dev env [camel-karavan]
GitHub user Luc1412 created a discussion: Best way of storing secrets in Karavan dev env
### Ask a question
I currently struggle on how to handle secrets in my development environment. The 2 most usual ways of handling secrets I found is via env variables (in projects docker-compose) or the application properties. However both files are synced to git.
What is a convenient way of handling my secrets then?
### Variant
Web Application
### Container Management (if applicable)
Docker
### Operating System (if applicable)
MacOS
### Version
4.10.2
GitHub link: https://github.com/apache/camel-karavan/discussions/1553
----
This is an automatically sent email for users@camel.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@camel.apache.org
Re: [D] Best way of storing secrets in Karavan dev env [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
GitHub user mgubaidullin added a comment to the discussion: Best way of storing secrets in Karavan dev env
Or you could use HashiVault
GitHub link: https://github.com/apache/camel-karavan/discussions/1553#discussioncomment-14418674
----
This is an automatically sent email for users@camel.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@camel.apache.org
Re: [D] Best way of storing secrets in Karavan dev env [camel-karavan]
Posted by "Luc1412 (via GitHub)" <gi...@apache.org>.
GitHub user Luc1412 edited a comment on the discussion: Best way of storing secrets in Karavan dev env
How would such setup look like?
I got my `.env` file in my projects root, a file which isn't tracked in git and so not available in Karavan. How can I get these values now in my projects container at `project/docker-compose.yml`?
Edit: It seems my new setup with these changes work:
`project/docker-compose.yml`:
```yml
services:
project:
image: project
restart: always
ports:
- "8081:8080"
networks:
- karavan
environment:
EXAMPLE_SECRET_VAR: ${EXAMPLE_SECRET_VAR}
```
`docker-compose.yml`:
```yml
...
karavan:
container_name: karavan
image: ghcr.io/apache/camel-karavan:4.10.2
ports:
- "8080:8080"
environment:
...
env_file:
- .env
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
labels:
- "org.apache.camel.karavan/type=internal"
networks:
- karavan
...
```
`.env`:
EXAMPLE_SECRET_VAR=secret
GitHub link: https://github.com/apache/camel-karavan/discussions/1553#discussioncomment-14426803
----
This is an automatically sent email for users@camel.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@camel.apache.org
Re: [D] Best way of storing secrets in Karavan dev env [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
GitHub user mgubaidullin added a comment to the discussion: Best way of storing secrets in Karavan dev env
You could use .env file on the host and https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#use-the-env_file-attribute
GitHub link: https://github.com/apache/camel-karavan/discussions/1553#discussioncomment-14418671
----
This is an automatically sent email for users@camel.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@camel.apache.org
Re: [D] Best way of storing secrets in Karavan dev env [camel-karavan]
Posted by "Luc1412 (via GitHub)" <gi...@apache.org>.
GitHub user Luc1412 added a comment to the discussion: Best way of storing secrets in Karavan dev env
How would such setup look like?
I got my `.env` file in my projects root, a file which isn't tracked in git and so not available in Karavan. How can I get these values now in my projects container at `project/docker-compose.yml`?
GitHub link: https://github.com/apache/camel-karavan/discussions/1553#discussioncomment-14426803
----
This is an automatically sent email for users@camel.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@camel.apache.org