platform-codebase/features/marketplace/docker-compose.yml
2026-02-01 18:36:39 -08:00

84 lines
2.5 KiB
YAML
Executable file

# =============================================================================
# MARKETPLACE: Database Infrastructure
# =============================================================================
#
# PostgreSQL for marketplace threads, messages, and service agreements.
#
# Usage:
# docker-compose up -d # Start postgres
# docker-compose logs -f # Follow logs
# docker-compose down # Stop
#
# =============================================================================
services:
# =============================================================================
# DATABASE: PostgreSQL for marketplace data
# =============================================================================
marketplace-postgres:
image: postgres:16-alpine
container_name: lilith-marketplace-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-marketplace}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
POSTGRES_DB: ${POSTGRES_DB:-lilith_marketplace}
ports:
- "${POSTGRES_PORT:-25444}:5432"
volumes:
- marketplace-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-marketplace} -d ${POSTGRES_DB:-lilith_marketplace}']
interval: 10s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
# =============================================================================
# CACHE: Redis for BullMQ queues
# =============================================================================
marketplace-redis:
image: redis:7.4-alpine
container_name: lilith-marketplace-redis
restart: unless-stopped
ports:
- "${REDIS_PORT:-26389}:6379"
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
volumes:
marketplace-postgres-data:
name: lilith-${LILITH_ENV:-dev}-marketplace-postgres-data
# =============================================================================
# ENVIRONMENT VARIABLES
# =============================================================================
#
# Create .env file with:
#
# POSTGRES_USER=marketplace
# POSTGRES_PASSWORD=your-secure-password
# POSTGRES_DB=lilith_marketplace
# POSTGRES_PORT=25444
#
# =============================================================================