(Vaadin Flow 24) Database Credentials via Docker-Compose File

Hello everyone,

im kinda new to Vaadin and Spring Boot. Im looking for a way to set the database credentials in an external file (like an .env file) or in the best case via the Environment Variables in a docker compose file. Is there a way? Because im using two database (dev and prod) and i often forget to change the database before deploying it.

(Vaadin Flow 24) Database Credentials via Docker-Compose File

Did you check the docs? https://docs.docker.com/compose/environment-variables/set-environment-variables/

yes i know but how do i get the environment variables into the application.properties?

Spring boot can resolve them in your application.properties.