This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/docker-compose.yml
2026-02-25 21:38:49 +00:00

64 lines
1.6 KiB
YAML

version: '3.8'
services:
# PostgreSQL database
postgres:
image: postgres:16-alpine
container_name: chat-switchboard-db
environment:
POSTGRES_USER: switchboard
POSTGRES_PASSWORD: ${DB_PASSWORD:-switchboard_dev}
POSTGRES_DB: chat_switchboard
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U switchboard -d chat_switchboard"]
interval: 5s
timeout: 5s
retries: 5
# Chat Switchboard (unified: Go backend + nginx frontend)
switchboard:
build:
context: .
dockerfile: Dockerfile
container_name: chat-switchboard
environment:
PORT: "8080"
BASE_PATH: ""
DB_HOST: postgres
DB_PORT: "5432"
DB_USER: switchboard
DB_PASSWORD: ${DB_PASSWORD:-switchboard_dev}
DB_NAME: chat_switchboard
DB_SSL_MODE: disable
JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
SWITCHBOARD_ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
SWITCHBOARD_ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin}
# File storage — mount ./data/storage on host
STORAGE_PATH: /data/storage
volumes:
- switchboard_storage:/data/storage
ports:
- "3000:80"
depends_on:
postgres:
condition: service_healthy
# Adminer for database management (optional, dev only)
adminer:
image: adminer:latest
container_name: chat-switchboard-adminer
ports:
- "8081:8080"
depends_on:
- postgres
profiles:
- dev
volumes:
postgres_data:
switchboard_storage: