Skip to content

Commit 1eec08c

Browse files
authored
fix: plaintext password issue via sealed secrets (#495)
* feat: migrate secrets to SOPS encryption - Add SOPS + Age encryption for Helm chart secrets (datamate, label-studio, milvus) - Remove plaintext passwords from values.yaml files - Replace hardcoded secrets in docker-compose.yml with env vars - Add .env.example template for Docker deployment path - Add scripts/secrets.sh helper for encrypt/decrypt/helm-install - Add docs/SECRETS_SETUP.md setup guide - Update .gitignore: exclude .sops-keys/, allow .env.example and .env.enc Deployment: - K8s/Helm: helm secrets install -f secrets.yaml - Docker: cp .env.example .env && edit && docker compose up * feat: update Makefile for SOPS secret management - K8s install: use helm secrets upgrade with -f secrets.yaml for datamate, label-studio, milvus - Docker install: add pre-check for .env file, exit with helpful message if missing - Set SOPS_AGE_KEY_FILE env var for helm secrets decryption * fix: remove hardcoded JWT secret and unify property naming - JwtUtils.java: remove hardcoded default "datamate-secret-key-for-jwt-token-generation" Change property from jwt.secret to datamate.jwt.secret (aligned with JwtConfig) - application.yml: add datamate.jwt.secret mapping from JWT_SECRET env var - application.yml: remove hardcoded defaults for DB_PASSWORD and REDIS_PASSWORD - docker-compose.yml: add JWT_SECRET env var to datamate-backend service - Helm values.yaml: add JWT_SECRET secretKeyRef to backend env - Helm secrets.yaml: add JWT_SECRET to public.secrets.data * fix: enforce encrypted private key and restrict permissions - Reject plaintext private keys on startup (exit with error) - Require CERT_PASS when key is encrypted - Set chmod 600 on decrypted key for restrictive access * fix: remove hardcoded passwords in Python config and exclude dev .env from Docker builds - Create .dockerignore to prevent runtime/datamate-python/.env from being copied into Docker images (it contained localhost:15432 telepresence debug settings) - config.py: remove hardcoded defaults for pgsql_password, mysql_password, label_studio_password, label_studio_user_token - docker-compose.yml: add explicit PGSQL_HOST/PGSQL_PORT for backend-python - Helm values.yaml: add explicit PGSQL_HOST/PGSQL_PORT for backend-python * refactor: encapsulate SOPS in scripts/secrets.sh, remove helm-secrets dependency - scripts/secrets.sh: add check_tools(), ensure_key() with auto-generation New helm-upgrade command: decrypts secrets.yaml and runs helm upgrade --install - Makefile: K8s install targets now call "bash scripts/secrets.sh helm-upgrade" instead of direct "helm secrets upgrade". No helm-secrets plugin needed. - Users only need sops + age (brew install), key auto-generated on first run. Docker users unaffected - still use .env file. * fix: pass Label Studio credentials to backend-python container - docker-compose.yml: add LABEL_STUDIO_USER_TOKEN, LABEL_STUDIO_PASSWORD env vars - Helm values.yaml: add secretKeyRef for both to backend-python env - secrets.yaml: add encrypted LABEL_STUDIO_USER_TOKEN, LABEL_STUDIO_PASSWORD Fixes 500 error "Label Studio API token is required" when creating annotation tasks after config.py defaults were removed. * fix: add LABEL_STUDIO_USERNAME env var for auto-login to Label Studio The loginAnnotationUsingGet flow requires label_studio_username to auto-login to Label Studio. Without it, clicking "edit" on an annotation task redirects to Label Studio login page instead of auto-authenticating. * docs: add LABEL_STUDIO_USERNAME to .env.example * fix: remove duplicate case blocks in scripts/secrets.sh causing syntax error * fix: add LABEL_STUDIO_USERNAME to Helm backend-python env The loginAnnotationUsingGet API requires label_studio_username to auto-login to Label Studio. Docker got this in 638931b, but the Helm values.yaml was missing it, causing K8s deployments to show Label Studio login prompt. * feat: migrate from SOPS to Sealed Secrets for K8s secret management Replace SOPS + Age encryption with Bitnami Sealed Secrets. No key distribution needed - secrets are encrypted with cluster public key, decrypted automatically by the in-cluster controller. Changes: - Add 3 SealedSecret YAMLs (datamate, label-studio, milvus) under deployment/kubernetes/sealed-secrets/ (safe to commit to Git) - Update Makefile: apply SealedSecrets before helm install - Helm charts: support existingSecret for label-studio, secrets.create flag to skip Helm-managed Secret creation - Remove SOPS artifacts: .sops.yaml, scripts/secrets.sh, secrets.yaml files User workflow: make install INSTALLER=k8s No tools needed on user machine. Controller decrypts automatically. * fix: pgbouncer also reads POSTGRE_PASSWORD from existingSecret When existingSecret is configured, the pgbouncer sidecar was still reading POSTGRE_PASSWORD from .Values.env (empty after SOPS migration), causing "password authentication failed" when connecting to PostgreSQL. * fix: set secrets.create: false to prevent Helm-SealedSecret conflict Helm must not create the datamate-conf Secret since it is managed by the SealedSecret controller. Without this, fresh installs fail with "conflict with controller" error. * fix: gateway reads JWT_SECRET from datamate-conf Secret Gateway was still reading JWT_SECRET from values.yaml (empty string), causing "JWT secret is required" startup error. Changed to secretKeyRef to match the SealedSecret-managed datamate-conf Secret. * fix: set created_by='system' for seed data to work with JWT data scope filter When DATAMATE_JWT_ENABLE=true, the Python backend's _apply_data_scope filter adds WHERE created_by IN ('user', 'system') to all BaseEntity queries. Seed data had empty created_by, causing templates, annotation templates, and operator categories to return 0 results. - t_clean_template: add created_by/updated_by='system' to INSERT - t_dm_annotation_templates: add COALESCE fallback in ON CONFLICT - t_operator_category: add UPDATE to fix empty created_by All three tables also get a safety-net UPDATE at the end. * fix: remove hardcoded DB_PASSWORD default fallback in gateway config The gateway's application.yml had password: ${DB_PASSWORD:password} which falls back to 'password' when DB_PASSWORD env var is not set. Removed the default so it fails fast if the variable is missing, consistent with the main-application config. * docs: add Sealed Secrets setup guide for online and offline environments - Add Secret Management section to README-zh.md and README.md - Document Sealed Secrets Controller installation (Helm) - Add air-gapped/offline environment instructions (image download) - Add kubeseal CLI usage for updating secrets - Add make download-sealed-secrets target for offline image download
1 parent 6673572 commit 1eec08c

26 files changed

Lines changed: 530 additions & 44 deletions

File tree

.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Environment files (local dev only, never in images)
2+
**/.env
3+
!.env.example
4+
5+
# Python
6+
**/__pycache__/
7+
**/*.pyc
8+
**/.venv/
9+
**/venv/
10+
11+
# Logs
12+
**/logs/
13+
**/*.log
14+
15+
# IDE
16+
.idea/
17+
.vscode/
18+
*.iml
19+
20+
# Git
21+
.git/
22+
.gitignore

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,7 @@ Thumbs.db
191191
# Milvus
192192
**/volumes/
193193

194-
**/rag_storage/
194+
**/rag_storage/
195+
# Environment files - ignore local .env, but allow templates
196+
.env
197+
!.env.example

Makefile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ help:
4646
@echo " make install Install datamate + milvus (prompts for method)"
4747
@echo " make install INSTALLER=docker Install using Docker Compose"
4848
@echo " make install INSTALLER=k8s Install using Kubernetes/Helm"
49+
@echo " make install INSTALLER=k8s (requires Sealed Secrets Controller)"
4950
@echo " make install-<component> Install specific component (prompts)"
5051
@echo " make <component>-docker-install Install component via Docker"
5152
@echo " make <component>-k8s-install Install component via Kubernetes"
@@ -69,6 +70,7 @@ help:
6970
@echo " make download VERSION=<version> Pull all images with specific version"
7071
@echo " make download REGISTRY=<registry> Pull images from specific registry"
7172
@echo " make load-images Load all downloaded images from dist/"
73+
@echo " make download-sealed-secrets Download Sealed Secrets image (for offline)"
7274
@echo ""
7375
@echo "Utility Commands:"
7476
@echo " make create-namespace Create Kubernetes namespace"
@@ -254,6 +256,13 @@ VALID_SERVICE_TARGETS := datamate backend frontend runtime backend-python databa
254256
done; \
255257
exit 1; \
256258
fi
259+
@if [ ! -f deployment/docker/datamate/.env ]; then \
260+
echo "ERROR: deployment/docker/datamate/.env not found."; \
261+
echo "Create it from the template:"; \
262+
echo " cp deployment/docker/datamate/.env.example deployment/docker/datamate/.env"; \
263+
echo "Then edit it with your actual passwords."; \
264+
exit 1; \
265+
fi
257266
@if [ "$*" = "label-studio" ]; then \
258267
REGISTRY=$(REGISTRY) docker compose -f deployment/docker/datamate/docker-compose.yml --profile label-studio up -d; \
259268
elif [ "$*" = "datamate" ]; then \
@@ -326,18 +335,21 @@ VALID_K8S_TARGETS := datamate deer-flow milvus label-studio data-juicer mineru m
326335
exit 1; \
327336
fi
328337
@if [ "$*" = "label-studio" ]; then \
338+
kubectl apply -f deployment/kubernetes/sealed-secrets/label-studio.yaml; \
329339
helm upgrade label-studio deployment/helm/label-studio/ -n $(NAMESPACE) --install; \
330340
elif [ "$*" = "mineru" ] || [ "$*" = "mineru-910B" ] || [ "$*" = "mineru-910C" ]; then \
331341
kubectl apply -f deployment/kubernetes/mineru/deploy-910.yaml -n $(NAMESPACE); \
332342
elif [ "$*" = "mineru-310P" ]; then \
333343
kubectl apply -f deployment/kubernetes/mineru/deploy-310.yaml -n $(NAMESPACE); \
334344
elif [ "$*" = "datamate" ]; then \
335-
helm upgrade datamate deployment/helm/datamate/ -n $(NAMESPACE) --install --set global.image.repository=$(REGISTRY); \
345+
kubectl apply -f deployment/kubernetes/sealed-secrets/datamate.yaml; \
346+
helm upgrade datamate deployment/helm/datamate/ -n $(NAMESPACE) --install --set global.image.repository=$(REGISTRY) --set public.secrets.create=false; \
336347
elif [ "$*" = "deer-flow" ]; then \
337348
cp runtime/deer-flow/.env deployment/helm/deer-flow/charts/public/.env; \
338349
cp runtime/deer-flow/conf.yaml deployment/helm/deer-flow/charts/public/conf.yaml; \
339350
helm upgrade deer-flow deployment/helm/deer-flow -n $(NAMESPACE) --install --set global.image.repository=$(REGISTRY); \
340351
elif [ "$*" = "milvus" ]; then \
352+
kubectl apply -f deployment/kubernetes/sealed-secrets/milvus.yaml; \
341353
helm upgrade milvus deployment/helm/milvus -n $(NAMESPACE) --install; \
342354
elif [ "$*" = "data-juicer" ] || [ "$*" = "dj" ]; then \
343355
kubectl apply -f deployment/kubernetes/data-juicer/deploy.yaml -n $(NAMESPACE); \
@@ -471,6 +483,17 @@ DEER_FLOW_IMAGES := \
471483
download-deer-flow:
472484
$(MAKE) download DOWNLOAD_IMAGES="$(DEER_FLOW_IMAGES)"
473485

486+
# Download Sealed Secrets controller image for offline/air-gapped environments
487+
SEALED_SECRETS_IMAGE := bitnami/sealed-secrets-controller:latest
488+
.PHONY: download-sealed-secrets
489+
download-sealed-secrets:
490+
@echo "Pulling Sealed Secrets controller image..."
491+
@mkdir -p dist
492+
docker pull $(SEALED_SECRETS_IMAGE)
493+
docker save $(SEALED_SECRETS_IMAGE) -o dist/sealed-secrets-controller.tar
494+
@echo "✅ Saved to dist/sealed-secrets-controller.tar"
495+
@echo "Transfer to offline environment and load with: docker load -i dist/sealed-secrets-controller.tar"
496+
474497
# Load all downloaded images from dist/ directory
475498
.PHONY: load-images
476499
load-images:

README-zh.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,50 @@
3232
- Make (用于构建和安装)
3333
- Docker (用于构建镜像和部署服务)
3434
- Docker-Compose (用于部署服务-docker方式)
35-
- kubernetes (用于部署服务-k8s方式)
35+
- Kubernetes (用于部署服务-k8s方式)
3636
- Helm (用于部署服务-k8s方式)
37+
- **K8s 部署额外需要**: [Sealed Secrets Controller](https://github.com/bitnami-labs/sealed-secrets)(用于加密管理敏感配置)
38+
39+
### 密钥管理(仅 K8s 部署需要)
40+
41+
DataMate K8s 部署使用 **Bitnami Sealed Secrets** 管理数据库密码、JWT 密钥等敏感信息。所有密钥以加密形式存储在 Git 中(`deployment/kubernetes/sealed-secrets/`),部署时由集群内的 Sealed Secrets Controller 自动解密。
42+
43+
**在线环境安装 Sealed Secrets Controller:**
44+
45+
```bash
46+
# 通过 Helm 安装(推荐)
47+
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
48+
helm install sealed-secrets sealed-secrets/sealed-secrets -n kube-system
49+
50+
# 验证安装
51+
kubectl get pods -n kube-system | grep sealed-secrets
52+
```
53+
54+
**离线环境:**
55+
56+
1. 在有网络的机器上下载 Sealed Secrets 镜像:
57+
```bash
58+
# 下载 controller 镜像(约 60MB)
59+
docker pull bitnami/sealed-secrets-controller:latest
60+
docker save bitnami/sealed-secrets-controller:latest -o sealed-secrets-controller.tar
61+
62+
# 下载 kubeseal 工具(用于更新密钥)
63+
# macOS:
64+
brew install kubeseal
65+
# Linux:
66+
wget https://github.com/bitnami-labs/sealed-secrets/releases/latest/download/kubeseal-linux-amd64
67+
```
68+
69+
2. 将镜像导入离线环境的镜像仓库,通过 Helm 安装时指定镜像地址。
70+
71+
**更新密钥:**
72+
73+
```bash
74+
# 如果数据库密码等敏感信息发生变更,使用 kubeseal 重新加密
75+
echo -n "new-password" | kubeseal --raw --name datamate-conf --namespace datamate --scope namespace-wide
76+
```
77+
78+
> 注意:Docker 部署方式不需要 Sealed Secrets,密钥统一通过 `.env` 文件管理(已在 `.gitignore` 中排除)。
3779
3880
### Docker一键部署
3981
```shell

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,48 @@ If you like this project, please give it a Star⭐️!
3737
- Docker-Compose (for service deployment - Docker method)
3838
- Kubernetes (for service deployment - k8s method)
3939
- Helm (for service deployment - k8s method)
40+
- **K8s deployment additionally requires**: [Sealed Secrets Controller](https://github.com/bitnami-labs/sealed-secrets) (for encrypted secret management)
41+
42+
### Secret Management (K8s deployment only)
43+
44+
DataMate K8s deployment uses **Bitnami Sealed Secrets** to manage sensitive configuration such as database passwords and JWT secrets. All secrets are stored in encrypted form in Git (`deployment/kubernetes/sealed-secrets/`) and automatically decrypted by the Sealed Secrets Controller in the cluster at deploy time.
45+
46+
**Online environment - install Sealed Secrets Controller:**
47+
48+
```bash
49+
# Install via Helm (recommended)
50+
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
51+
helm install sealed-secrets sealed-secrets/sealed-secrets -n kube-system
52+
53+
# Verify installation
54+
kubectl get pods -n kube-system | grep sealed-secrets
55+
```
56+
57+
**Air-gapped / offline environment:**
58+
59+
1. Download the Sealed Secrets image on an internet-connected machine:
60+
```bash
61+
# Download controller image (~60MB)
62+
docker pull bitnami/sealed-secrets-controller:latest
63+
docker save bitnami/sealed-secrets-controller:latest -o sealed-secrets-controller.tar
64+
65+
# Download kubeseal CLI (for updating secrets)
66+
# macOS:
67+
brew install kubeseal
68+
# Linux:
69+
wget https://github.com/bitnami-labs/sealed-secrets/releases/latest/download/kubeseal-linux-amd64
70+
```
71+
72+
2. Transfer the image to your offline registry, then install via Helm with the custom image reference.
73+
74+
**Updating secrets:**
75+
76+
```bash
77+
# When passwords change, re-encrypt with kubeseal
78+
echo -n "new-password" | kubeseal --raw --name datamate-conf --namespace datamate --scope namespace-wide
79+
```
80+
81+
> Note: Docker deployments do not require Sealed Secrets — secrets are managed via the `.env` file (excluded from Git via `.gitignore`).
4082
4183
### Docker Quick deploy
4284
```shell

backend/api-gateway/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spring:
2222
driver-class-name: org.postgresql.Driver
2323
url: jdbc:postgresql://datamate-database:5432/datamate?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
2424
username: ${DB_USERNAME:postgres}
25-
password: ${DB_PASSWORD:password}
25+
password: ${DB_PASSWORD}
2626
hikari:
2727
maximum-pool-size: 20
2828
minimum-idle: 5

backend/services/main-application/src/main/resources/application.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spring:
1414
driver-class-name: org.postgresql.Driver
1515
url: jdbc:postgresql://datamate-database:5432/datamate?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
1616
username: ${DB_USERNAME:postgres}
17-
password: ${DB_PASSWORD:password}
17+
password: ${DB_PASSWORD}
1818
hikari:
1919
maximum-pool-size: 20
2020
minimum-idle: 5
@@ -59,7 +59,7 @@ spring:
5959
host: datamate-redis
6060
port: 6379
6161
timeout: 2000
62-
password: ${REDIS_PASSWORD:password}
62+
password: ${REDIS_PASSWORD}
6363
lettuce:
6464
pool:
6565
max-active: 20
@@ -131,6 +131,10 @@ management:
131131

132132
# 平台配置
133133
datamate:
134+
# JWT配置
135+
jwt:
136+
secret: ${JWT_SECRET}
137+
134138
# 通用配置
135139

136140

backend/shared/security-common/src/main/java/com/datamate/common/security/JwtUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@Component
1717
public class JwtUtils {
1818

19-
@Value("${jwt.secret:datamate-secret-key-for-jwt-token-generation}")
19+
@Value("${datamate.jwt.secret}")
2020
private String secret;
2121

2222
@Value("${jwt.expiration:86400}") // 24小时
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# DataMate Environment Variables Template
2+
# Copy this file to .env and fill in the values
3+
# cp .env.example .env
4+
# IMPORTANT: Never commit .env to git! It is already in .gitignore.
5+
#
6+
# For K8s/Helm deployment: secrets are managed via Sealed Secrets.
7+
# For Docker deployment: use this .env file (gitignored, local only).
8+
9+
# Database
10+
DB_PASSWORD=your-secure-password-here
11+
12+
# JWT Authentication
13+
JWT_SECRET=your-secure-jwt-secret-here
14+
DATAMATE_JWT_ENABLE=false
15+
16+
# MinIO (for Milvus storage)
17+
MINIO_ACCESS_KEY=your-minio-access-key
18+
MINIO_SECRET_KEY=your-minio-secret-key
19+
20+
# Label Studio
21+
LABEL_STUDIO_USERNAME=admin@demo.com
22+
LABEL_STUDIO_PASSWORD=your-labelstudio-password
23+
LABEL_STUDIO_USER_TOKEN=your-labelstudio-token
24+
LABEL_STUDIO_HOST=
25+
26+
# Optional: SSL Certificate Password (for encrypted private keys)
27+
CERT_PASS=
28+
29+
# Optional: Domain for HTTPS
30+
DOMAIN=

deployment/docker/datamate/docker-compose.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ services:
99
restart: on-failure
1010
privileged: true
1111
environment:
12-
- DB_PASSWORD=${DB_PASSWORD:-password}
12+
- DB_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is required. Set in .env file}
13+
- JWT_SECRET=${JWT_SECRET:?JWT_SECRET is required. Set in .env file}
1314
- datamate.jwt.enable=${DATAMATE_JWT_ENABLE:-false}
1415
volumes:
1516
- dataset_volume:/dataset
@@ -30,9 +31,14 @@ services:
3031
- "18000:18000"
3132
environment:
3233
- log_level=DEBUG
33-
- pgsql_password=${DB_PASSWORD:-password}
34+
- PGSQL_HOST=datamate-database
35+
- PGSQL_PORT=5432
36+
- pgsql_password=${DB_PASSWORD:?DB_PASSWORD is required. Set in .env file}
3437
- datamate_jwt_enable=${DATAMATE_JWT_ENABLE:-false}
3538
- milvus_uri=${MILVUS_URI:-http://milvus:19530}
39+
- LABEL_STUDIO_USERNAME=${LABEL_STUDIO_USERNAME:-admin@demo.com}
40+
- LABEL_STUDIO_USER_TOKEN=${LABEL_STUDIO_USER_TOKEN:-}
41+
- LABEL_STUDIO_PASSWORD=${LABEL_STUDIO_PASSWORD:-}
3642
volumes:
3743
- dataset_volume:/dataset
3844
- flow_volume:/flow
@@ -52,7 +58,7 @@ services:
5258
ports:
5359
- '8080:8080'
5460
environment:
55-
- JWT_SECRET=default-insecure-key-change-in-production
61+
- JWT_SECRET=${JWT_SECRET:-}
5662
- datamate.jwt.enable=${DATAMATE_JWT_ENABLE:-false}
5763
networks: [ datamate ]
5864

@@ -75,7 +81,7 @@ services:
7581
restart: on-failure
7682
environment:
7783
- POSTGRES_USER=postgres
78-
- POSTGRES_PASSWORD=${DB_PASSWORD:-password}
84+
- POSTGRES_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is required. Set in .env file}
7985
volumes:
8086
- postgresql_volume:/var/lib/postgresql/data
8187
- database_log_volume:/var/log/datamate/database
@@ -93,7 +99,7 @@ services:
9399
PG_HOST: "datamate-database"
94100
PG_PORT: "5432"
95101
PG_USER: "postgres"
96-
PG_PASSWORD: ${DB_PASSWORD:-password}
102+
PG_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required. Set in .env file}
97103
PG_DATABASE: "datamate"
98104
command:
99105
- python
@@ -213,7 +219,7 @@ services:
213219
- DB_PORT=5432
214220
- DB_NAME=labelstudio
215221
- DB_USER=postgres
216-
- DB_PASSWORD=${DB_PASSWORD:-password}
222+
- DB_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is required. Set in .env file}
217223
- AUTH_TYPE=scram-sha-256
218224
- POOL_MODE=transaction
219225
- MAX_CLIENT_CONN=100
@@ -241,17 +247,17 @@ services:
241247
- DJANGO_DB=default
242248
- POSTGRE_NAME=labelstudio
243249
- POSTGRE_USER=postgres
244-
- POSTGRE_PASSWORD=${DB_PASSWORD:-password}
250+
- POSTGRE_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is required. Set in .env file}
245251
- POSTGRE_PORT=5432
246252
- POSTGRE_HOST=label-studio-pgbouncer
247253
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}
248254
- LOCAL_FILES_SERVING_ENABLED=true
249255
- LOCAL_FILES_DOCUMENT_ROOT=/label-studio/local
250256
- USE_USERNAME_FOR_LOGIN=true
251257
- LABEL_STUDIO_USERNAME=admin@demo.com
252-
- LABEL_STUDIO_PASSWORD=demoadmin
258+
- LABEL_STUDIO_PASSWORD=${LABEL_STUDIO_PASSWORD:-}
253259
- LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN=true
254-
- LABEL_STUDIO_USER_TOKEN=abc123abc123
260+
- LABEL_STUDIO_USER_TOKEN=${LABEL_STUDIO_USER_TOKEN:-}
255261
- LOG_LEVEL=DEBUG
256262
volumes:
257263
- label-studio-data:/label-studio/data:rw
@@ -290,8 +296,8 @@ services:
290296
container_name: milvus-minio
291297
image: minio/minio:RELEASE.2024-12-18T13-15-44Z
292298
environment:
293-
MINIO_ACCESS_KEY: minioadmin
294-
MINIO_SECRET_KEY: minioadmin
299+
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-}
300+
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-}
295301
ports:
296302
- "9001:9001"
297303
- "9000:9000"

0 commit comments

Comments
 (0)