29 lines
695 B
YAML
29 lines
695 B
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: notesvault
|
|
POSTGRES_USER: notesvault
|
|
POSTGRES_PASSWORD: notesvault
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U notesvault"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build: .
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: postgres
|
|
DATASOURCE_URL: jdbc:postgresql://postgres:5432/notesvault
|
|
DATASOURCE_USERNAME: notesvault
|
|
DATASOURCE_PASSWORD: notesvault
|
|
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET must be set}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|