-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
201 lines (193 loc) · 5.9 KB
/
docker-compose.dev.yml
File metadata and controls
201 lines (193 loc) · 5.9 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# ReportCast - Development Docker Compose
#
# This file builds images locally from source code.
# Perfect for developers making code changes.
#
# For production deployment, use: docker-compose.yml (pre-built images)
#
# Quick start:
# 1. cp .env.example .env
# 2. Edit .env and add your API keys
# 3. docker compose -f docker-compose.dev.yml up -d
# 4. docker exec reportcast-api npm run db:migrate
#
# Images will be built locally from Dockerfiles.
# Code changes require rebuild: docker compose -f docker-compose.dev.yml build
# Version: 0.4.0
# TTS: Piper-GPL (free, self-hosted)
# Storage: Local disk (MinIO optional)
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: reportcast-postgres
restart: unless-stopped
environment:
POSTGRES_USER: reportcast
POSTGRES_PASSWORD: ${DB_PASSWORD:-your_secure_password_here}
POSTGRES_DB: reportcast
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U reportcast"]
interval: 10s
timeout: 5s
retries: 5
# Redis (BullMQ backend)
redis:
image: redis:7-alpine
container_name: reportcast-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
# MinIO (Optional - S3-compatible object storage)
# Disabled by default (using local disk storage)
# Uncomment to enable S3 storage
# minio:
# image: minio/minio:latest
# container_name: reportcast-minio
# restart: unless-stopped
# command: server /data --console-address ":9001"
# environment:
# MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
# MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
# ports:
# - "9000:9000" # S3 API
# - "9001:9001" # Web Console
# volumes:
# - minio_data:/data
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
# interval: 30s
# timeout: 10s
# retries: 3
# TTS Server (Piper-GPL - Free, Self-hosted)
# 19 voices pre-loaded (TR, EN, DE, FR, ES, RU)
tts-server:
build:
context: .
dockerfile: Dockerfile.piper-http
image: reportcast-piper-tts:${TTS_VERSION:-latest}
container_name: reportcast-tts
restart: unless-stopped
ports:
- "5000:5000"
# No healthcheck - Piper doesn't have GET endpoint
# API Server
api:
# image: ghcr.io/ismailperim/reportcast-api:${API_VERSION:-latest}
build:
context: .
dockerfile: packages/api/Dockerfile
image: reportcast-api:latest
container_name: reportcast-api
restart: unless-stopped
working_dir: /app/packages/api
command: ["npx", "tsx", "src/index.ts"]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3000
DEPLOYMENT_MODE: saas
DB_HOST: postgres
DB_PORT: 5432
DB_USER: reportcast
DB_PASSWORD: ${DB_PASSWORD:-your_secure_password_here}
DB_NAME: reportcast
REDIS_HOST: redis
REDIS_PORT: 6379
TTS_SERVER_URL: http://tts-server:5000
JWT_SECRET: ${JWT_SECRET:-change_me_in_production}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
ELEVENLABS_API_KEY: ${ELEVENLABS_API_KEY}
ENABLE_OPENAI_TTS: ${ENABLE_OPENAI_TTS:-false}
ENABLE_ELEVENLABS_TTS: ${ENABLE_ELEVENLABS_TTS:-false}
PUBLIC_URL: ${PUBLIC_URL:-http://localhost:5173}
# S3 disabled (using local disk)
# S3_PROVIDER: ${S3_PROVIDER}
# S3_ENDPOINT: ${S3_ENDPOINT}
# S3_ACCESS_KEY: ${S3_ACCESS_KEY}
# S3_SECRET_KEY: ${S3_SECRET_KEY}
# S3_BUCKET: ${S3_BUCKET:-reportcast}
# S3_REGION: ${S3_REGION:-us-east-1}
# S3_PUBLIC_URL: ${S3_PUBLIC_URL}
ports:
- "3000:3000"
volumes:
- ./uploads:/app/uploads
- ./outputs:/app/outputs
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# BullMQ Worker
worker:
# image: ghcr.io/ismailperim/reportcast-worker:${WORKER_VERSION:-latest}
build:
context: .
dockerfile: packages/worker/Dockerfile
image: reportcast-worker:latest
container_name: reportcast-worker
restart: unless-stopped
working_dir: /app/packages/worker
command: ["npx", "tsx", "src/queue-worker.ts"]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
tts-server:
condition: service_started
environment:
NODE_ENV: production
WORKER_CONCURRENCY: 1
DB_HOST: postgres
DB_PORT: 5432
DB_USER: reportcast
DB_PASSWORD: ${DB_PASSWORD:-your_secure_password_here}
DB_NAME: reportcast
REDIS_HOST: redis
REDIS_PORT: 6379
TTS_SERVER_URL: http://tts-server:5000
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
ELEVENLABS_API_KEY: ${ELEVENLABS_API_KEY}
ENABLE_OPENAI_TTS: ${ENABLE_OPENAI_TTS:-false}
ENABLE_ELEVENLABS_TTS: ${ENABLE_ELEVENLABS_TTS:-false}
# S3 disabled (using local disk)
# S3_PROVIDER: ${S3_PROVIDER}
# S3_ENDPOINT: ${S3_ENDPOINT}
# S3_ACCESS_KEY: ${S3_ACCESS_KEY}
# S3_SECRET_KEY: ${S3_SECRET_KEY}
# S3_BUCKET: ${S3_BUCKET:-reportcast}
# S3_REGION: ${S3_REGION:-us-east-1}
volumes:
- ./uploads:/app/uploads
- ./outputs:/app/outputs
volumes:
postgres_data:
driver: local
redis_data:
driver: local
# minio_data: # Optional - uncomment if using MinIO
# driver: local
networks:
default:
name: reportcast-network