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 [email protected].
To unsubscribe, please send an email to: [email protected]