45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
# =============================================================================
|
|
# MEDIA: Database Infrastructure
|
|
# =============================================================================
|
|
#
|
|
# PostgreSQL for media file metadata.
|
|
#
|
|
# Usage:
|
|
# docker-compose up -d # Start postgres
|
|
# docker-compose logs -f # Follow logs
|
|
# docker-compose down # Stop
|
|
#
|
|
# =============================================================================
|
|
|
|
services:
|
|
media-postgres:
|
|
image: postgres:16-alpine
|
|
container_name: lilith-media-postgres
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-media}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
|
|
POSTGRES_DB: ${POSTGRES_DB:-lilith_media}
|
|
|
|
ports:
|
|
- "${POSTGRES_PORT:-25446}:5432"
|
|
|
|
volumes:
|
|
- media-postgres-data:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-media} -d ${POSTGRES_DB:-lilith_media}']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "5"
|
|
|
|
volumes:
|
|
media-postgres-data:
|
|
name: lilith-${LILITH_ENV:-dev}-media-postgres-data
|