61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: ai-chat-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
container_name: ai-chat-backend
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
APP_HOST: 0.0.0.0
|
|
APP_PORT: 8000
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- app_uploads:/data/uploads
|
|
- app_temp:/data/temp
|
|
- app_logs:/data/logs
|
|
ports:
|
|
- "18000:8000"
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
|
container_name: ai-chat-frontend
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
|
INTERNAL_API_URL: http://backend:8000
|
|
depends_on:
|
|
- backend
|
|
ports:
|
|
- "13000:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
app_uploads:
|
|
app_temp:
|
|
app_logs:
|