I’m trying to import a file using “spring.config.import”. I saw in the documentation that you can import in 2 ways. 1 using multiple files (configtree) and the other is where the file is a .yaml file.
I’ve seen issues from others, but they’re using configtree and I’d like to use yaml file instead because it can store multiple variables more easily IMO:
- Using external config in spring boot application within docker-compose
When running the app, it always says:
Config data resource 'file [config/backend-secrets.yaml]' via location 'file:./config/secrets.yaml' does not exist
Here is a simple compose file that I have
services:
backend:
image: ghcr.io/acemint/something:main
container_name: backend
environment:
SPRING_CONFIG_IMPORT: file:./config/backend-secrets.yaml
secrets:
- backend_secrets
volumes:
- ./config/secrets/:/app/config