sandbox-notebookllamalm-nextjs/docker-compose.yml
Vadym Samoilenko 289cc4c27f Fix backend DB connection inside Docker container
database.py: use pgql_host/pgql_port env vars (default: localhost:5433)
docker-compose.yml: set pgql_host=postgres, pgql_port=5432 for backend service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:48:56 +00:00

83 lines
1.8 KiB
YAML

services:
postgres:
image: postgres:18
container_name: sandbox-nextjs-postgres
ports:
- "5433:5432"
environment:
POSTGRES_DB: postgres_nextjs
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
volumes:
- pgdata_nextjs:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: sandbox-nextjs-redis
ports:
- "6380:6379"
volumes:
- redis_data:/data
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: sandbox-nextjs-backend
ports:
- "9000:9000"
env_file:
- ./backend/.env
environment:
PODCAST_DATA_DIR: conversations
pgql_host: postgres
pgql_port: "5432"
volumes:
- podcasts_data:/app/conversations
- uploads_data:/app/failed_uploads
depends_on:
- postgres
- redis
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: sandbox-nextjs-frontend
ports:
- "4000:4000"
environment:
NODE_ENV: production
PORT: "4000"
NEXT_PUBLIC_API_URL: "https://ai-sandbox.oliver.solutions/notebookllama-back"
NEXT_PUBLIC_WS_URL: "wss://ai-sandbox.oliver.solutions/notebookllama-back"
depends_on:
- backend
restart: unless-stopped
jaeger:
image: jaegertracing/all-in-one:latest
container_name: sandbox-nextjs-jaeger
ports:
- "17000:16686"
- "14317:4317"
- "14318:4318"
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
restart: unless-stopped
adminer:
image: adminer
container_name: sandbox-nextjs-adminer
ports:
- "9001:8080"
restart: unless-stopped
volumes:
pgdata_nextjs:
redis_data:
podcasts_data:
uploads_data: