-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (64 loc) · 2.44 KB
/
docker-compose.yml
File metadata and controls
66 lines (64 loc) · 2.44 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
services:
# Unified container with MongoDB, Backend, and Frontend
planton:
image: ${PLANTON_IMAGE:-ghcr.io/plantonhq/openmcf:latest}
container_name: openmcf
restart: unless-stopped
ports:
- '3000:3000' # Frontend
- '50051:50051' # Backend gRPC
networks:
- openmcf-network
environment:
- HOME=/home/appuser
# MongoDB configuration (runs internally in the container)
- MONGODB_URI=${MONGODB_URI:-mongodb://localhost:27017/openmcf}
- MONGODB_DATABASE=${MONGODB_DATABASE:-openmcf}
# Backend configuration
- SERVER_PORT=50051
# CORS configuration (optional - defaults work for most users)
# Uncomment to customize allowed origins for cross-origin requests
# - CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
# Uncomment to disable CORS if using reverse proxy (Caddy/nginx)
# - ENABLE_CORS=false
# Pulumi configuration (uses local file-based backend by default)
# Backend is automatically configured by entrypoint.sh via 'pulumi login --local'
- PULUMI_HOME=/home/appuser/.pulumi
- PULUMI_STATE_DIR=/home/appuser/.pulumi/state
- PULUMI_CONFIG_PASSPHRASE=${PULUMI_CONFIG_PASSPHRASE:-openmcf-default-passphrase}
- PULUMI_SKIP_UPDATE_CHECK=true
- PULUMI_AUTOMATION_API_SKIP_VERSION_CHECK=true
# Frontend configuration
- NODE_ENV=production
- NEXT_TELEMETRY_DISABLED=1
- API_URL=${API_URL:-${NEXT_PUBLIC_API_URL:-http://localhost:50051}}
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:50051}
- PORT=3000
- HOSTNAME=0.0.0.0
# Optional: Use Pulumi Cloud instead of local backend
# - PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN}
# - PULUMI_BACKEND_URL=${PULUMI_BACKEND_URL:-https://api.pulumi.com}
volumes:
# Persist Pulumi state across container restarts
- pulumi-state:/home/appuser/.pulumi
# Persist Go build cache to avoid "no space left on device" errors
- go-cache:/home/appuser/go
# Persist MongoDB data
- mongodb-data:/data/db
healthcheck:
# Check if frontend is responding
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3000']
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
openmcf-network:
driver: bridge
volumes:
pulumi-state:
driver: local
go-cache:
driver: local
mongodb-data:
driver: local