first to addDB service
This commit is contained in:
@@ -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
|
||||
|
||||
# -----------------------
|
||||
# Conversation‑logging 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:
|
||||
Reference in New Issue
Block a user