fix: resolve env_file variable interpolation issues by adding support for and default syntax

This commit is contained in:
yuefanxiao
2025-05-08 01:23:08 +08:00
parent 1b29e031e3
commit 22d9233f8b
9 changed files with 276 additions and 20 deletions
+4
View File
@@ -0,0 +1,4 @@
DOC_ENGINE=${DOC_ENGINE:-elasticsearch}
COMPOSE_PROFILES=${DOC_ENGINE}
MINIO_CONSOLE_PORT=9001
MINIO_PORT=9000
+14
View File
@@ -0,0 +1,14 @@
version: '3'
services:
minio:
image: quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z
container_name: ragflow-minio
command: server --console-address ":9001" /data
ports:
- ${MINIO_PORT}:9000
- ${MINIO_CONSOLE_PORT}:9001
env_file: .env
environment:
- DOC_ENGINE=test-env
restart: on-failure
@@ -0,0 +1,56 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: minio
name: minio
spec:
ports:
- name: "9000"
port: 9000
targetPort: 9000
- name: "9001"
port: 9001
targetPort: 9001
selector:
io.kompose.service: minio
---
apiVersion: v1
kind: Pod
metadata:
labels:
io.kompose.service: minio
name: minio
spec:
containers:
- args:
- server
- --console-address
- :9001
- /data
envFrom:
- configMapRef:
name: env
image: quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z
name: ragflow-minio
ports:
- containerPort: 9000
protocol: TCP
- containerPort: 9001
protocol: TCP
restartPolicy: OnFailure
---
apiVersion: v1
data:
COMPOSE_PROFILES: test-env
DOC_ENGINE: test-env
MINIO_CONSOLE_PORT: "9001"
MINIO_PORT: "9000"
kind: ConfigMap
metadata:
labels:
io.kompose.service: minio-env
name: env
@@ -0,0 +1,56 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: minio
name: minio
spec:
ports:
- name: "9000"
port: 9000
targetPort: 9000
- name: "9001"
port: 9001
targetPort: 9001
selector:
io.kompose.service: minio
---
apiVersion: v1
kind: Pod
metadata:
labels:
io.kompose.service: minio
name: minio
spec:
containers:
- args:
- server
- --console-address
- :9001
- /data
envFrom:
- configMapRef:
name: env
image: quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z
name: ragflow-minio
ports:
- containerPort: 9000
protocol: TCP
- containerPort: 9001
protocol: TCP
restartPolicy: OnFailure
---
apiVersion: v1
data:
COMPOSE_PROFILES: test-env
DOC_ENGINE: test-env
MINIO_CONSOLE_PORT: "9001"
MINIO_PORT: "9000"
kind: ConfigMap
metadata:
labels:
io.kompose.service: minio-env
name: env