- Create local volume for PostgreSQL data
mkdir postgres-data
- Use Postgres Docker image, Create Container storage with DB storage, User storage, and Password storage
docker run -d --name storage -e POSTGRES_USER=storage -e POSTGRES_PASSWORD=storage -e PGDATA=/var/lib/postgresql/data/pgdata -e POSTGRES_DB=storage -p5432:5432 -v $PWD/postgres-data:/var/lib/postgresql/data postgres
- Create Spring Boot Minimal JPA with PostgreSQL https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.6.5&packaging=jar&jvmVersion=11&groupId=dev.wcs.minijpa&artifactId=local-storage&name=local-storage&description=Sample%20Project%20for%20a%20Minimal%20JPA%20with%20local%20Persistence%20using%20PostgreSQL&packageName=dev.wcs.minijpa.local-storage&dependencies=postgresql,data-jpa