Changeset 0.9.0 (#50)

This commit is contained in:
2026-02-23 01:57:28 +00:00
parent 15be26c516
commit 8264aa6016
94 changed files with 9812 additions and 8574 deletions

View File

@@ -7,11 +7,10 @@ services:
container_name: chat-switchboard-db
environment:
POSTGRES_USER: switchboard
POSTGRES_PASSWORD: switchboard_dev
POSTGRES_PASSWORD: ${DB_PASSWORD:-switchboard_dev}
POSTGRES_DB: chat_switchboard
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d:ro
ports:
- "5432:5432"
healthcheck:
@@ -20,7 +19,31 @@ services:
timeout: 5s
retries: 5
# Adminer for database management (optional)
# 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}
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
@@ -28,31 +51,8 @@ services:
- "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"
profiles:
- dev
volumes:
postgres_data: