-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (103 loc) · 3.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
109 lines (103 loc) · 3.6 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
# =============================================================================
# BREPFLOW (sim4d) - Docker Compose Configuration
# =============================================================================
# Web-first Parametric CAD Application
# Integrates with MADFAM shared infrastructure
# =============================================================================
name: sim4d
services:
# Studio - Main React CAD application
studio:
build:
context: .
dockerfile: Dockerfile.studio
container_name: sim4d-studio
ports:
- '5173:5173'
volumes:
- ./apps/studio:/app/apps/studio
- ./packages:/app/packages
- /app/node_modules
- /app/apps/studio/node_modules
environment:
- NODE_ENV=development
- VITE_API_BASE_URL=http://localhost:3001
- VITE_COLLAB_WS_URL=ws://localhost:8081
# Janua Auth Integration
- JANUA_ENABLED=true
- JANUA_JWT_SECRET=dev-shared-janua-secret-32chars!!
- JANUA_API_URL=http://janua-api:8001
- ENABLE_MOCK_GEOMETRY=false
- REQUIRE_REAL_OCCT=true
networks:
- madfam-shared-network
depends_on:
- collaboration
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:5173']
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
command: pnpm --filter @sim4d/studio run dev --host 0.0.0.0
# Marketing - Landing page
marketing:
build:
context: .
dockerfile: Dockerfile.marketing
container_name: sim4d-marketing
ports:
- '3040:3000' # Changed to avoid conflict with other marketing sites
volumes:
- ./apps/marketing:/app/apps/marketing
- ./packages:/app/packages
- /app/node_modules
- /app/apps/marketing/node_modules
environment:
- NODE_ENV=development
networks:
- madfam-shared-network
command: pnpm --filter @sim4d/marketing run dev --host 0.0.0.0
# Collaboration WebSocket Server
collaboration:
build:
context: .
dockerfile: Dockerfile.collaboration
container_name: sim4d-collaboration
ports:
- '8081:8080' # Changed to avoid conflict with enclii
volumes:
- ./packages/collaboration/dist:/app/packages/collaboration/dist
environment:
- NODE_ENV=${NODE_ENV:-development}
- COLLAB_PORT=8080
- HEARTBEAT_INTERVAL=30000
- LOCK_TIMEOUT=60000
- ENABLE_RATE_LIMIT=${ENABLE_RATE_LIMIT:-true}
- MAX_CONNECTIONS_PER_IP=${MAX_CONNECTIONS_PER_IP:-10}
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost:5173}
# Use shared Redis for collaboration sessions
- REDIS_URL=redis://:redis_dev_password@madfam-redis-shared:6379/6
networks:
- madfam-shared-network
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:8080/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
command: node packages/collaboration/dist/server/standalone-server.cjs
# =============================================================================
# SHARED INFRASTRUCTURE NOTE:
# =============================================================================
# This configuration uses the shared PostgreSQL and Redis from:
# ~/labspace/solarpunk-foundry/ops/local/docker-compose.shared.yml
#
# Redis: madfam-redis-shared:6379/6 (for collaboration sessions)
#
# Start shared infrastructure first:
# cd ~/labspace/solarpunk-foundry/ops/bin && ./madfam.sh start
# =============================================================================
networks:
madfam-shared-network:
external: true