first to addDB service

This commit is contained in:
2025-06-15 20:20:54 +01:00
parent 873280d027
commit 9d5fb3f5be
6 changed files with 266 additions and 2 deletions

View File

@@ -1,4 +1,42 @@
services:
# -----------------------
# Database (PostgreSQL)
# -----------------------
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"
interval: 10s
timeout: 5s
retries: 5
# -----------------------
# Conversationlogging microservice
# -----------------------
db_service:
build:
context: ./db_service
restart: unless-stopped
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_HOST
- LOG_TOKEN
depends_on:
postgres:
condition: service_healthy
ports:
- "8000:8000" # expose externally only if needed
matrix_service:
build: ./matrix_service
environment:
@@ -25,6 +63,10 @@ services:
redis:
image: redis:7
restart: unless-stopped
volumes:
- redis-data:/data
volumes:
matrix_data:
matrix_data:
redis-data:
postgres-data: