feat: add db configuration

This commit is contained in:
2026-02-20 22:08:15 +03:00
parent 46385fa1d2
commit 32c96ae06b
2 changed files with 28 additions and 0 deletions

17
docker-compose.yml Normal file
View File

@@ -0,0 +1,17 @@
version: "3.8"
services:
postgres:
image: postgres:15-alpine
container_name: bankcards-postgres
environment:
POSTGRES_DB: bankcards
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:

View File

@@ -0,0 +1,11 @@
spring:
datasource:
url: jdbc:postgresql://localhost:5432/bankcards
username: postgres
password: postgres
jpa:
hibernate:
ddl-auto: validate
server:
port: 8080