You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

79 lines
1.8 KiB

services:
postgres:
image: postgres:16-alpine
container_name: ent-postgres
restart: always
environment:
POSTGRES_USER: enterprise
POSTGRES_PASSWORD: enterprise123
POSTGRES_DB: enterprise_ai
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-db:/docker-entrypoint-initdb.d
ports:
- "5431:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U enterprise"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: ent-redis
restart: always
command: redis-server --appendonly yes --requirepass redis123
volumes:
- redis_data:/data
ports:
- "6378:6379"
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: ent-backend
restart: always
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
environment:
DATABASE_URL: postgresql+asyncpg://enterprise:enterprise123@postgres:5432/enterprise_ai
REDIS_URL: redis://:redis123@redis:6379/0
JWT_SECRET: dev-secret-key-change-in-production-32chars
LLM_API_KEY: ${LLM_API_KEY:-sk-placeholder}
LLM_API_BASE: ${LLM_API_BASE:-https://api.openai.com/v1}
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
ports:
- "8100:8000"
volumes:
- ./backend:/app
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: ent-frontend
restart: always
depends_on:
- backend
ports:
- "3000:80"
nginx:
image: nginx:alpine
container_name: ent-nginx
restart: always
depends_on:
- frontend
- backend
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "80:80"
volumes:
postgres_data:
redis_data: