-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.79 KB
/
docker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# AITuberFlow Docker Compose Configuration
#
# Usage:
# Development: docker compose up --build
# Production: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
# Environment variables can be set in .env file at the project root
services:
# Backend API Server (TypeScript / Bun)
backend:
build:
context: .
dockerfile: apps/server-ts/Dockerfile
container_name: aituberflow-backend
ports:
- "${BACKEND_PORT:-8001}:8001"
environment:
- PORT=8001
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:3000}
volumes:
# Persist database
- backend-data:/app/data
# Mount plugins directory for development
- ./plugins:/app/plugins:ro
# Mount templates directory
- ./templates:/app/templates:ro
healthcheck:
test: ["CMD", "bun", "-e", "fetch('http://localhost:8001/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Frontend Web Application
frontend:
build:
context: ./apps/web
dockerfile: Dockerfile
args:
# NEXT_PUBLIC_* vars are inlined at build time, not runtime
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8001}
container_name: aituberflow-frontend
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
restart: unless-stopped
volumes:
backend-data:
name: aituberflow-backend-data
networks:
default:
name: aituberflow-network