-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
142 lines (134 loc) · 5.39 KB
/
Copy pathdocker-compose.yml
File metadata and controls
142 lines (134 loc) · 5.39 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
name: roomote
services:
postgres:
container_name: roomote-postgres
image: pgvector/pgvector:0.8.1-pg17@sha256:3e8b3adfd27b5707128f60956f62a793c3c9326ea8cfaf0eab7adccb5d700b21
# Publish datastore ports to loopback only so Postgres, Redis, and MinIO are
# never reachable from another host. The production Caddy overlay resets
# these to none; use an SSH tunnel or reverse proxy if remote access is
# genuinely needed.
ports:
- '127.0.0.1:15432:5432'
volumes:
- pg_data:/var/lib/postgresql/data
- ./.docker/scripts/postgres:/docker-entrypoint-initdb.d
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DATABASES=roomote_test,roomote_development
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d roomote_development']
interval: 5s
timeout: 30s
retries: 5
start_period: 30s
redis:
container_name: roomote-redis
image: redis:7-alpine@sha256:6ab0b6e7381779332f97b8ca76193e45b0756f38d4c0dcda72dbb3c32061ab99
ports:
- '127.0.0.1:16379:6379'
volumes:
- redis_data:/data
command: redis-server --appendonly yes
minio:
container_name: roomote-minio
image: minio/minio:RELEASE.2025-09-07T16-13-09Z@sha256:14cea493d9a34af32f524e538b8346cf79f3321eff8e708c1e2960462bd8936e
ports:
- '127.0.0.1:19000:9000'
- '127.0.0.1:19001:9001'
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY_ID:-roomote}
MINIO_ROOT_PASSWORD: ${S3_SECRET_ACCESS_KEY:-roomote-local-artifacts-password}
command: server /data --console-address ':9001'
minio-init:
image: minio/mc:RELEASE.2025-08-13T08-35-41Z@sha256:a7fe349ef4bd8521fb8497f55c6042871b2ae640607cf99d9bede5e9bdf11727
restart: 'no'
depends_on:
minio:
condition: service_started
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY_ID:-roomote}
MINIO_ROOT_PASSWORD: ${S3_SECRET_ACCESS_KEY:-roomote-local-artifacts-password}
S3_BUCKET_ARTIFACTS: ${S3_BUCKET_ARTIFACTS:-roomote-artifacts}
entrypoint: ['/bin/sh', '-c']
command:
- |
until mc alias set roomote http://minio:9000 "$$MINIO_ROOT_USER" "$$MINIO_ROOT_PASSWORD"; do
sleep 1
done
mc mb --ignore-existing "roomote/$$S3_BUCKET_ARTIFACTS"
# Local dev edge mirroring the production Caddy routing: one origin serves
# the web app and proxies the reserved /_roomote-api/* prefix to the API.
# The dev CLI points the public tunnel at this port so hosted compute
# workers can reach the API through the public app URL.
caddy-dev:
container_name: roomote-caddy-dev
image: caddy:2.10-alpine@sha256:4c6e91c6ed0e2fa03efd5b44747b625fec79bc9cd06ac5235a779726618e530d
environment:
S3_BUCKET_ARTIFACTS: ${S3_BUCKET_ARTIFACTS:-roomote-artifacts}
ROOMOTE_PREVIEW_PROXY_PORT: ${ROOMOTE_PREVIEW_PROXY_PORT:-18081}
ROOMOTE_PREVIEW_DOMAIN: ${ROOMOTE_PREVIEW_DOMAIN:-roomotepreview.localhost}
ports:
- '127.0.0.1:18080:18080'
volumes:
- ./.docker/caddy:/etc/caddy:ro
extra_hosts:
- 'host.docker.internal:host-gateway'
# The Brain (deployment-hosted gbrain), managed alongside the other local
# datastores. Opt in with COMPOSE_PROFILES=brain (or `pnpm
# brain:up`). The port is published to loopback only because the local
# api/bullmq processes run on the host rather than in this network; in the
# self-host and installer stacks the Brain publishes no ports at all and is
# reachable only from the app services.
gbrain:
profiles: [brain]
container_name: roomote-gbrain
build: .docker/gbrain
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
GBRAIN_DATABASE_URL: postgres://postgres:password@postgres:5432/roomote_development
GBRAIN_ADMIN_BOOTSTRAP_TOKEN: ${R_GBRAIN_ADMIN_TOKEN:-}
# The Brain holds no provider key. It calls back into this deployment,
# which injects whichever provider key an admin configured in Settings,
# so rotating or switching that key needs no restart here. Setting a
# provider key below instead makes the Brain call the provider directly.
OPENAI_BASE_URL: ${GBRAIN_OPENAI_BASE_URL:-http://host.docker.internal:3001/api/brain/inference}
OPENAI_API_KEY: ${R_BRAIN_GATEWAY_TOKEN:-}
GBRAIN_RERANKER_MODEL: ${R_BRAIN_RERANKER_MODEL:-}
# Create-time, and it has to be the container that receives these: the
# embedding model and its width are decided when the Brain is created,
# and the gateway must never substitute a different one afterwards.
# Set both before the first boot, or neither. The synthesis model is
# the opposite (R_BRAIN_MODEL, applied by the gateway per request).
GBRAIN_EMBEDDING_MODEL: ${R_BRAIN_EMBEDDING_MODEL:-}
GBRAIN_EMBEDDING_DIMENSIONS: ${R_BRAIN_EMBEDDING_DIMENSIONS:-}
ports:
- '127.0.0.1:8935:8931'
volumes:
- gbrain_data:/data
healthcheck:
# The image ships bun, not curl/wget.
test:
[
'CMD-SHELL',
'bun -e "const r = await fetch(\"http://127.0.0.1:8931/health\"); process.exit(r.ok ? 0 : 1)"',
]
interval: 10s
timeout: 5s
retries: 12
start_period: 60s
volumes:
pg_data:
redis_data:
minio_data:
gbrain_data:
name: roomote_gbrain_data
networks:
default:
name: roomote_default
driver: bridge