59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL database
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: chat-switchboard-db
|
|
environment:
|
|
POSTGRES_USER: switchboard
|
|
POSTGRES_PASSWORD: switchboard_dev
|
|
POSTGRES_DB: chat_switchboard
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./migrations:/docker-entrypoint-initdb.d:ro
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U switchboard -d chat_switchboard"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Adminer for database management (optional)
|
|
adminer:
|
|
image: adminer:latest
|
|
container_name: chat-switchboard-adminer
|
|
ports:
|
|
- "8081:8080"
|
|
depends_on:
|
|
- postgres
|
|
|
|
# Backend API (uncomment when implemented)
|
|
# api:
|
|
# build:
|
|
# context: ./server
|
|
# dockerfile: Dockerfile
|
|
# container_name: chat-switchboard-api
|
|
# environment:
|
|
# DATABASE_URL: postgres://switchboard:switchboard_dev@postgres:5432/chat_switchboard?sslmode=disable
|
|
# PORT: 8080
|
|
# JWT_SECRET: your-secret-key-change-in-production
|
|
# ports:
|
|
# - "8080:8080"
|
|
# depends_on:
|
|
# postgres:
|
|
# condition: service_healthy
|
|
|
|
# Frontend dev server (optional)
|
|
frontend:
|
|
image: nginx:alpine
|
|
container_name: chat-switchboard-frontend
|
|
volumes:
|
|
- ./standalone:/usr/share/nginx/html:ro
|
|
ports:
|
|
- "3000:80"
|
|
|
|
volumes:
|
|
postgres_data:
|