-
-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathdocker-compose-personal.yml
More file actions
217 lines (196 loc) · 7.58 KB
/
docker-compose-personal.yml
File metadata and controls
217 lines (196 loc) · 7.58 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
version: '3.8'
# ==============================================================================
# Atom Personal Edition - Docker Compose Configuration
# ==============================================================================
# Simplified Docker Compose for Local Development with Phase 66 Integrations
#
# Quick Start:
# 1. Copy .env.personal to .env: cp .env.personal .env
# 2. Edit .env with your API keys and preferences
# 3. Start: docker-compose -f docker-compose-personal.yml up -d
# 4. Access: http://localhost:8000 (API) or http://localhost:3000 (Frontend)
#
# Minimum Required:
# - One AI provider key (OpenAI, Anthropic, or DeepSeek)
# - Encryption keys (generate with: openssl rand -base64 32)
#
# Features:
# - SQLite database (no external DB required)
# - Backend API with hot reload
# - Frontend Next.js dev server
# - Valkey (Redis-compatible) for agent communication
# - Browser automation (optional)
# - Phase 66 Integrations (pre-configured):
# * Media: Spotify (OAuth)
# * Smart Home: Philips Hue, Home Assistant (local)
# * Productivity: Notion (OAuth)
# * Creative: FFmpeg (pre-installed)
# - All data persists in ./data directory
#
# Local-Only Mode:
# Set ATOM_LOCAL_ONLY=true in .env to block all cloud services (Spotify, Notion, etc.)
# Local services continue to work: Hue, Home Assistant, FFmpeg, Sonos
# ==============================================================================
services:
# ==============================================================================
# Backend API Service
# ==============================================================================
# Main Atom backend with all Phase 66 integrations pre-configured
atom-backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: atom-personal-backend
ports:
- "8000:8000"
environment:
# Database (SQLite for Personal Edition)
- DATABASE_URL=sqlite:///./data/atom.db
- SQLITE_PATH=./data/atom.db
# Basic configuration
- ENVIRONMENT=development
- LOG_LEVEL=INFO
- PYTHONUNBUFFERED=1
# AI Providers (required - at least one)
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY:-}
# Encryption keys (required - generate with: openssl rand -base64 32)
- BYOK_ENCRYPTION_KEY=${BYOK_ENCRYPTION_KEY:-default-insecure-key-change-me}
- JWT_SECRET_KEY=${JWT_SECRET_KEY:-default-jwt-secret-change-me}
# Vector embeddings (local, fast, free)
- LANCEDB_PATH=./data/lancedb
- ENABLE_LANCEDB=true
- EMBEDDING_PROVIDER=fastembed
- FASTEMBED_MODEL=BAAI/bge-small-en-v1.5
# Redis (Valkey for agent communication)
- REDIS_URL=redis://valkey:6379
# ==============================================================================
# PHASE 66: Personal Edition Enhancements
# ==============================================================================
# Local-Only Mode (Privacy Feature)
# When enabled, blocks all cloud-based services (Spotify, Notion, etc.)
# Local services continue to work: Sonos, Hue, Home Assistant, FFmpeg
- ATOM_LOCAL_ONLY=${ATOM_LOCAL_ONLY:-false}
# Media Integrations (OAuth)
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID:-}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET:-}
- SPOTIFY_REDIRECT_URI=http://localhost:8000/integrations/spotify/callback
# Smart Home (Local - work in local-only mode)
- HUE_BRIDGE_IP=${HUE_BRIDGE_IP:-} # Auto-discovered if not set
- HOME_ASSISTANT_URL=${HOME_ASSISTANT_URL:-http://host.docker.internal:8123}
- HOME_ASSISTANT_TOKEN=${HOME_ASSISTANT_TOKEN:-}
# Productivity (OAuth - blocked in local-only mode)
- NOTION_CLIENT_ID=${NOTION_CLIENT_ID:-}
- NOTION_CLIENT_SECRET=${NOTION_CLIENT_SECRET:-}
- NOTION_REDIRECT_URI=http://localhost:8000/integrations/notion/callback
- NOTION_API_KEY=${NOTION_API_KEY:-} # Alternative to OAuth
# Creative Tools (Local - work in local-only mode)
- FFMPEG_ALLOWED_DIRS=/app/data/media,/app/data/exports
# Security & Audit
- AUDIT_LOG_PATH=logs/audit.log
- AUDIT_LOG_RETENTION_DAYS=${AUDIT_LOG_RETENTION_DAYS:-90}
# Optional: Browser automation
- BROWSER_HOST=browser-node
- BROWSER_PORT=3000
volumes:
# Persist all data
- ./data:/app/data
- ./backend:/app # Hot reload for development
working_dir: /app
command: uvicorn main_api_app:app --host 0.0.0.0 --port 8000 --reload
restart: unless-stopped
depends_on:
valkey:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/live"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- atom-local
# Extra hosts for local network access
extra_hosts:
- "host.docker.internal:host-gateway"
# ==============================================================================
# Valkey (Redis-Compatible) Service
# ==============================================================================
# Valkey is a Linux Foundation project (LGPL-3.0) - 100% Redis protocol compatible
# Personal Edition: In-memory only (no persistence) for faster development
valkey:
image: valkey/valkey:latest
container_name: atom-personal-valkey
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- atom-local
# ==============================================================================
# Frontend Next.js Service
# ==============================================================================
# React frontend for Atom Personal Edition
atom-frontend:
build:
context: ./frontend-nextjs
dockerfile: Dockerfile
container_name: atom-personal-frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
- NODE_ENV=development
- NEXT_PUBLIC_ENABLE_MQTT=false
volumes:
- ./frontend-nextjs:/app
- /app/node_modules
- /app/.next
working_dir: /app
command: npm run dev
restart: unless-stopped
depends_on:
- atom-backend
- valkey
networks:
- atom-local
# ==============================================================================
# Browser Automation Service (Optional)
# ==============================================================================
# Comment out this service if not needed for browser automation
browser-node:
image: browserless/chrome:latest
container_name: atom-personal-browser
ports:
- "3001:3000"
environment:
- MAX_CONCURRENT_SESSIONS=3
- MAX_QUEUE_LENGTH=5
- PREBOOT_CHROME=true
- CONNECTION_TIMEOUT=60000
restart: unless-stopped
networks:
- atom-local
# ==============================================================================
# Networks
# ==============================================================================
networks:
atom-local:
driver: bridge
internal: false # Allow outbound for OAuth, local-only mode controls this
ipam:
config:
- subnet: 172.28.0.0/16
# ==============================================================================
# Volumes
# ==============================================================================
volumes:
# All data persisted in ./data directory on host
atom-personal-data:
driver: local