This is a small playground to test avoiding database credentials in GIT but having them provided as environmental variables in Docker container.
- uses Docker multi-stage build (builds application with Maven)
- runtime container is Tomcat container with build WAR archive
To get startet provide a ".env" file with following content:
| Property | Description |
|---|---|
| DB_URL | Jdbc url for example: jdbc:postgresql://Calisto:5432/lotte |
| DB_USER | the database user |
| DB_PASSWORD | the password of the database user |
| DB_DRIVER_CLASS | Jdbc driver class for example: org.postgresql.Driver |
| DB_DRIVER | for example: org.postgresql:postgresql:42.2.23 |
The .env file is excluded from GIT !
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Liquibase Migration
- Jersey
- Spring Boot Actuator
The following guides illustrate how to use some features concretely: