Support minified dev deployment (#10512)

* Support minified dev deployment

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update readme

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Merge compose files

Signed-off-by: Artem Savchenko <armisav@gmail.com>

---------

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko
2026-02-16 17:38:33 +07:00
committed by GitHub
parent 8328cf2631
commit 499cc8cd96
4 changed files with 127 additions and 336 deletions
+2
View File
@@ -196,6 +196,8 @@ rush docker:up # Will set up all the containers
Be aware `rush docker:build` will automatically execute all required phases like build, bundle, package.
> **Note:** For resource-constrained machines, you can use the minified variants `rush docker:min` and `rush docker:up:min` to build and run only the required services (excludes hulypulse, redis, process, backup, rating, preview, link-preview, elastic, fulltext, payment, stats, print, sign, hulygun, hulykvs).
Alternatively, you can just execute:
```bash
+17 -1
View File
@@ -243,7 +243,7 @@
"commandKind": "global",
"name": "docker",
"summary": "Build docker with platform",
"description": "use to build all docker containers required for platform",
"description": "Build all docker containers required for platform. Use --minified for resource-constrained dev (or rush docker:min).",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/docker.sh"
},
@@ -271,6 +271,22 @@
"safeForSimultaneousRushProcesses": true,
"shellCommand": "cd ./dev && docker compose up -d --force-recreate transactor_cockroach"
},
{
"commandKind": "global",
"name": "docker:min",
"summary": "Build minified docker images for resource-constrained dev",
"description": "Build docker images excluding optional services (hulypulse, redis, process, backup, rating, preview, link-preview, elastic, fulltext, payment, stats, print, sign, hulygun, hulykvs). Use with rush docker:up:min",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/docker.sh --minified"
},
{
"commandKind": "global",
"name": "docker:up:min",
"summary": "Up minified development stack",
"description": "Start minified docker compose (docker-compose.yaml + docker-compose.min.yaml) for resource-constrained machines",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "cd ./dev && docker compose -f docker-compose.yaml -f docker-compose.min.yaml up -d --force-recreate"
},
{
"commandKind": "global",
"name": "docker:local",
+61 -31
View File
@@ -1,31 +1,61 @@
rush docker:build -p 20 \
--to @hcengineering/pod-server \
--to @hcengineering/pod-front \
--to @hcengineering/prod \
--to @hcengineering/pod-account \
--to @hcengineering/pod-workspace \
--to @hcengineering/pod-collaborator \
--to @hcengineering/tool \
--to @hcengineering/pod-print \
--to @hcengineering/pod-sign \
--to @hcengineering/pod-analytics-collector \
--to @hcengineering/rekoni-service \
--to @hcengineering/pod-ai-bot \
--to @hcengineering/import-tool \
--to @hcengineering/pod-stats \
--to @hcengineering/pod-fulltext \
--to @hcengineering/pod-love \
--to @hcengineering/pod-mail \
--to @hcengineering/pod-datalake \
--to @hcengineering/pod-mail-worker \
--to @hcengineering/pod-export \
--to @hcengineering/pod-media \
--to @hcengineering/pod-preview \
--to @hcengineering/pod-link-preview \
--to @hcengineering/pod-external \
--to @hcengineering/pod-backup \
--to @hcengineering/backup-api-pod \
--to @hcengineering/pod-billing \
--to @hcengineering/pod-process \
--to @hcengineering/pod-rating \
--to @hcengineering/pod-payment
#!/bin/bash
# Supports minified mode for resource-constrained dev machines:
# rush docker --minified or rush docker:min
MINIFIED=false
for arg in "$@"; do
if [ "$arg" = "--minified" ]; then
MINIFIED=true
break
fi
done
if [ "$MINIFIED" = true ]; then
echo "Building minified docker images (excluding optional services)..."
rush docker:build -p 20 \
--to @hcengineering/pod-server \
--to @hcengineering/pod-front \
--to @hcengineering/prod \
--to @hcengineering/pod-account \
--to @hcengineering/pod-workspace \
--to @hcengineering/pod-collaborator \
--to @hcengineering/tool \
--to @hcengineering/pod-analytics-collector \
--to @hcengineering/rekoni-service \
--to @hcengineering/pod-datalake \
--to @hcengineering/pod-export \
--to @hcengineering/pod-media \
--to @hcengineering/pod-external
else
rush docker:build -p 20 \
--to @hcengineering/pod-server \
--to @hcengineering/pod-front \
--to @hcengineering/prod \
--to @hcengineering/pod-account \
--to @hcengineering/pod-workspace \
--to @hcengineering/pod-collaborator \
--to @hcengineering/tool \
--to @hcengineering/pod-print \
--to @hcengineering/pod-sign \
--to @hcengineering/pod-analytics-collector \
--to @hcengineering/rekoni-service \
--to @hcengineering/pod-ai-bot \
--to @hcengineering/import-tool \
--to @hcengineering/pod-stats \
--to @hcengineering/pod-fulltext \
--to @hcengineering/pod-love \
--to @hcengineering/pod-mail \
--to @hcengineering/pod-datalake \
--to @hcengineering/pod-mail-worker \
--to @hcengineering/pod-export \
--to @hcengineering/pod-media \
--to @hcengineering/pod-preview \
--to @hcengineering/pod-link-preview \
--to @hcengineering/pod-external \
--to @hcengineering/pod-backup \
--to @hcengineering/backup-api-pod \
--to @hcengineering/pod-billing \
--to @hcengineering/pod-process \
--to @hcengineering/pod-rating \
--to @hcengineering/pod-payment
fi
+47 -304
View File
@@ -1,326 +1,69 @@
# Min override: excludes optional services from min deployment.
# Use with: docker compose -f docker-compose.yaml -f docker-compose.min.yaml up
# (rush docker:up:min)
# Excluded: preview, link-preview, elastic, redis, stats, payment, fulltext_cockroach,
# print, sign, hulykvs, hulygun, hulypulse, process-service, backup-cockroach,
# backup-api, rating_cockroach
# Overrides below remove dependencies on excluded services so the min project validates.
services:
cockroach:
image: cockroachdb/cockroach:latest-v24.3
extra_hosts:
- 'huly.local:host-gateway'
ports:
- '26257:26257'
- '8089:8080'
command: start-single-node --insecure
volumes:
- cockroach_db:/cockroach/cockroach-data
restart: unless-stopped
redpanda:
image: docker.redpanda.com/redpandadata/redpanda:v24.3.6
extra_hosts:
- 'huly.local:host-gateway'
command:
- redpanda
- start
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
- --advertise-kafka-addr internal://redpanda:9092,external://localhost:19092
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
- --advertise-pandaproxy-addr internal://redpanda:8082,external://localhost:18082
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
- --rpc-addr redpanda:33145
- --advertise-rpc-addr redpanda:33145
- --mode dev-container
- --smp 1
- --default-log-level=info
container_name: redpanda
volumes:
- redpanda:/var/lib/redpanda/data
ports:
- 18081:18081
- 18082:18082
- 19092:19092
- 19644:9644
healthcheck:
test: ['CMD', 'rpk', 'cluster', 'info', '-X', 'user=superuser', '-X', 'pass=secretpassword']
interval: 10s
timeout: 5s
retries: 10
minio:
image: 'minio/minio'
command: server /data --address ":9000" --console-address ":9001"
extra_hosts:
- 'huly.local:host-gateway'
expose:
- 9000
- 9001
ports:
- 9000:9000
- 9001:9001
volumes:
- files:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
retries: 10
restart: unless-stopped
preview:
profiles: ["full"]
link-preview:
profiles: ["full"]
elastic:
image: 'elasticsearch:7.14.2'
expose:
- 9200
extra_hosts:
- 'huly.local:host-gateway'
volumes:
- elastic:/usr/share/elasticsearch/data
ports:
- 9200:9200
environment:
- ELASTICSEARCH_PORT_NUMBER=9200
- BITNAMI_DEBUG=true
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1024m -Xmx1024m
healthcheck:
interval: 20s
retries: 10
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'
restart: unless-stopped
account:
image: hardcoreeng/account
extra_hosts:
- 'huly.local:host-gateway'
links:
- cockroach
- minio
- stats
ports:
- 3000:3000
volumes:
- ./branding.json:/var/cfg/branding.json
environment:
- ACCOUNT_PORT=3000
- QUEUE_CONFIG=${QUEUE_CONFIG}
- SERVER_SECRET=secret
- ADMIN_EMAILS=admin,${PLATFORM_ADMIN_EMAILS}
- STATS_URL=http://huly.local:4900
- WORKSPACE_LIMIT_PER_USER=10000
- DB_URL=${DB_CR_URL}
# - DB_URL=${MONGO_URL}
# - DB_NS=account-2
# Pass only one region to disallow selection for new workspaces.
- REGION_INFO=cockroach|CockroachDB
- TRANSACTOR_URL=ws://huly.local:3333,ws://huly.local:3332;;cockroach,
- MAIL_URL=
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://huly.local:8087
- MODEL_ENABLED=*
- LAST_NAME_FIRST=true
# - WS_LIVENESS_DAYS=1
- ACCOUNTS_URL=http://huly.local:3000
- BRANDING_PATH=/var/cfg/branding.json
# - DISABLE_SIGNUP=true
restart: unless-stopped
profiles: ["full"]
redis:
profiles: ["full"]
stats:
image: hardcoreeng/stats
extra_hosts:
- 'huly.local:host-gateway'
ports:
- 4900:4900
environment:
- PORT=4900
- SERVER_SECRET=secret
restart: unless-stopped
profiles: ["full"]
payment:
image: hardcoreeng/payment
extra_hosts:
- 'huly.local:host-gateway'
ports:
- 3040:3040
environment:
- SECRET=secret
- PORT=3040
- ACCOUNTS_URL=http://huly.local:3000
- FRONT_URL=http://huly.local:8087
- USE_SANDBOX=true
- POLAR_ACCESS_TOKEN=${POLAR_ACCESS_TOKEN}
- POLAR_WEBHOOK_SECRET=${POLAR_WEBHOOK_SECRET}
- POLAR_SUBSCRIPTION_PLANS=${POLAR_SUBSCRIPTION_PLANS}
restart: unless-stopped
profiles: ["full"]
fulltext_cockroach:
profiles: ["full"]
print:
profiles: ["full"]
sign:
profiles: ["full"]
hulykvs:
profiles: ["full"]
hulygun:
profiles: ["full"]
hulypulse:
profiles: ["full"]
process-service:
profiles: ["full"]
backup-cockroach:
profiles: ["full"]
backup-api:
profiles: ["full"]
rating_cockroach:
profiles: ["full"]
account:
links: !override []
workspace_cockroach:
image: hardcoreeng/workspace
extra_hosts:
- 'huly.local:host-gateway'
links:
links: !override
- cockroach
- minio
- stats
volumes:
- ./branding.json:/var/cfg/branding.json
environment:
- WS_OPERATION=all+backup
- REGION=cockroach
- SERVER_SECRET=secret
- QUEUE_CONFIG=${QUEUE_CONFIG}
- DB_URL=${DB_CR_URL}
- STATS_URL=http://huly.local:4900
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://huly.local:3000
- ACCOUNTS_DB_URL=${DB_CR_URL}
- BRANDING_PATH=/var/cfg/branding.json
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
- BACKUP_BUCKET=${BACKUP_BUCKET_NAME}
- MAIL_URL=
- INIT_WORKSPACE=staging-dev
restart: unless-stopped
collaborator:
image: hardcoreeng/collaborator
extra_hosts:
- 'huly.local:host-gateway'
links:
- cockroach
links: !override
- minio
- transactor_cockroach
- stats
ports:
- 3078:3078
environment:
- COLLABORATOR_PORT=3078
- SECRET=secret
- ACCOUNTS_URL=http://huly.local:3000
- STORAGE_CONFIG=${STORAGE_CONFIG}
- STATS_URL=http://huly.local:4900
restart: unless-stopped
front:
image: hardcoreeng/front
extra_hosts:
- 'huly.local:host-gateway'
links:
- cockroach
- minio
- elastic
- transactor_cockroach
- collaborator
- stats
ports:
- 8087:8080
- 8088:8080
environment:
- SERVER_PORT=8080
- SERVER_SECRET=secret
- ACCOUNTS_URL=http://huly.local:3000
- STATS_URL=http://huly.local:4900
- UPLOAD_URL=/files
- GMAIL_URL=http://huly.local:8088
- CALENDAR_URL=http://huly.local:8095
- TELEGRAM_URL=http://huly.local:8086
- REKONI_URL=http://huly.local:4004
- COLLABORATOR_URL=ws://huly.local:3078
- STORAGE_CONFIG=${STORAGE_CONFIG}
- GITHUB_URL=http://huly.local:3500
- PRINT_URL=http://huly.local:4005
- SIGN_URL=http://huly.local:4006
# - ANALYTICS_COLLECTOR_URL=http://huly.local:4017
- DESKTOP_UPDATES_URL=https://dist.huly.io
- DESKTOP_UPDATES_CHANNEL=dev
- DESKTOP_UPDATES_CHANNELS=dev;tracex:dev-tracex
- BRANDING_URL=http://huly.local:8087/branding.json
- STREAM_URL=http://huly.local:1080/recording
- PAYMENT_URL=http://huly.local:3040
# - DISABLE_SIGNUP=true
restart: unless-stopped
links: !override []
transactor_cockroach:
image: hardcoreeng/transactor
extra_hosts:
- 'huly.local:host-gateway'
links:
links: !override
- cockroach
- minio
- account
- stats
ports:
- 3332:3332
volumes:
- ./branding.json:/var/cfg/branding.json
environment:
- QUEUE_CONFIG=${QUEUE_CONFIG}
- SERVER_PORT=3332
- REGION=cockroach
- SERVER_SECRET=secret
- ENABLE_COMPRESSION=true
- FULLTEXT_URL=http://huly.local:4702
- STATS_URL=http://huly.local:4900
- DB_URL=${DB_CR_URL}
- METRICS_CONSOLE=false
- METRICS_FILE=metrics.txt
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://huly.local:8087
- MAIL_URL=''
- ACCOUNTS_URL=http://huly.local:3000
- LAST_NAME_FIRST=true
- BRANDING_PATH=/var/cfg/branding.json
- AI_BOT_URL=http://huly.local:4010
- COMMUNICATION_TIME_LOGGING_ENABLED=true
restart: unless-stopped
fulltext_cockroach:
image: hardcoreeng/fulltext
extra_hosts:
- 'huly.local:host-gateway'
restart: unless-stopped
links:
- elastic
- cockroach
ports:
- 4702:4702
environment:
- PORT=4702
- REGION=cockroach
- SERVER_SECRET=secret
- QUEUE_CONFIG=${QUEUE_CONFIG}
- DB_URL=${DB_CR_URL}
- FULLTEXT_DB_URL=http://huly.local:9200
- ELASTIC_INDEX_NAME=local_storage_index # Same index for simplicity
- STORAGE_CONFIG=${STORAGE_CONFIG}
- STATS_URL=http://huly.local:4900
- REKONI_URL=http://huly.local:4004
- ACCOUNTS_URL=http://huly.local:3000
export:
links: !override
- minio
datalake:
image: hardcoreeng/datalake
extra_hosts:
- 'huly.local:host-gateway'
depends_on:
depends_on: !override
minio:
condition: service_healthy
cockroach:
condition: service_started
stats:
condition: service_started
account:
condition: service_started
ports:
- 4030:4030
environment:
- PORT=4030
- SECRET=secret
- ACCOUNTS_URL=http://huly.local:3000
- STATS_URL=http://huly.local:4900
- STREAM_URL=http://huly.local:1080/recording
- DB_URL=${DB_CR_URL}
- BUCKETS=blobs,eu|http://minio:9000?accessKey=minioadmin&secretKey=minioadmin
restart: unless-stopped
redis:
image: redis:8.0.2-alpine3.21
ports:
- 6379:6379
restart: unless-stopped
hulypulse:
image: hardcoreeng/hulypulse
depends_on:
redis:
condition: service_started
ports:
- 8099:8099
environment:
- HULY_REDIS_URLS=redis://redis:6379
- HULY_BIND_PORT=8099
restart: unless-stopped
volumes:
db:
dbpg:
files:
elastic:
cockroach_db:
redpanda: