37 lines
682 B
YAML
37 lines
682 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_NAME: nutri
|
|
DB_USER: nutri
|
|
DB_PASSWORD: nutri
|
|
SPRING_PROFILES_ACTIVE: dev
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: nutri
|
|
POSTGRES_USER: nutri
|
|
POSTGRES_PASSWORD: nutri
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U nutri -d nutri"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
volumes:
|
|
pgdata:
|