Skip to content

Commit 0e0f0b0

Browse files
committed
fix(cli): enhance Docker configuration by adding new environment variables and updating volume mount options
1 parent e307fe0 commit 0e0f0b0

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

src/client/acontext-cli/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ db/
6767
acontext_data/
6868

6969
.docker-compose-*.yaml
70+
71+
config.yaml

src/client/acontext-cli/cmd/create.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ func runCreate(cmd *cobra.Command, args []string) error {
107107
if err != nil {
108108
return err
109109
}
110-
if err != nil {
111-
return err
112-
}
113110
fmt.Printf("✓ Selected template: %s\n", preset.Name)
114111
fmt.Println()
115112

@@ -264,12 +261,12 @@ func promptTemplate(language string) (string, *config.Preset, error) {
264261
}
265262

266263
presets, err := config.GetPresets(language)
267-
264+
268265
// Clear loading message if it was shown
269266
if needsDiscovery {
270267
fmt.Print("\r" + strings.Repeat(" ", 50) + "\r")
271268
}
272-
269+
273270
if err != nil {
274271
return "", nil, fmt.Errorf("failed to get presets: %w", err)
275272
}

src/client/acontext-cli/internal/docker/docker-compose.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,17 @@ services:
151151
container_name: acontext-server-core
152152
restart: unless-stopped
153153
environment:
154-
LLM_BASE_URL: ${LLM_BASE_URL}
155154
LLM_API_KEY: ${LLM_API_KEY}
155+
LLM_BASE_URL: ${LLM_BASE_URL}
156156
LLM_SDK: ${LLM_SDK}
157+
LLM_SIMPLE_MODEL: ${LLM_SIMPLE_MODEL:-gpt-4.1}
158+
LLM_RESPONSE_TIMEOUT: ${LLM_RESPONSE_TIMEOUT:-60}
159+
BLOCK_EMBEDDING_PROVIDER: ${BLOCK_EMBEDDING_PROVIDER:-openai}
160+
BLOCK_EMBEDDING_MODEL: ${BLOCK_EMBEDDING_MODEL:-text-embedding-3-small}
161+
BLOCK_EMBEDDING_DIM: ${BLOCK_EMBEDDING_DIM:-1536}
162+
BLOCK_EMBEDDING_API_KEY: ${BLOCK_EMBEDDING_API_KEY:-}
163+
BLOCK_EMBEDDING_BASE_URL: ${BLOCK_EMBEDDING_BASE_URL:-}
164+
BLOCK_EMBEDDING_SEARCH_COSINE_DISTANCE_THRESHOLD: ${BLOCK_EMBEDDING_SEARCH_COSINE_DISTANCE_THRESHOLD:-0.8}
157165
DATABASE_URL: postgresql://${DATABASE_USER:-acontext}:${DATABASE_PASSWORD:-helloworld}@acontext-server-pg:5432/${DATABASE_NAME:-acontext}
158166
MQ_URL: amqp://${RABBITMQ_USER:-acontext}:${RABBITMQ_PASSWORD:-helloworld}@acontext-server-rabbitmq:5672/
159167
REDIS_URL: redis://:${REDIS_PASSWORD:-helloworld}@acontext-server-redis:6379
@@ -162,7 +170,7 @@ services:
162170
ports:
163171
- "${CORE_EXPORT_PORT:-8019}:8000"
164172
volumes:
165-
- ${CORE_CONFIG_YAML_FILE:-./config.yaml}:/app/config.yaml
173+
- ${CORE_CONFIG_YAML_FILE:-./config.yaml}:/app/config.yaml:ro
166174
depends_on:
167175
acontext-server-pg:
168176
condition: service_healthy

src/server/docker-compose.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,24 @@ services:
152152
container_name: acontext-server-core
153153
restart: unless-stopped
154154
environment:
155-
LLM_BASE_URL: ${LLM_BASE_URL}
156155
LLM_API_KEY: ${LLM_API_KEY}
156+
LLM_BASE_URL: ${LLM_BASE_URL}
157157
LLM_SDK: ${LLM_SDK}
158+
LLM_SIMPLE_MODEL: ${LLM_SIMPLE_MODEL:-gpt-4.1}
159+
LLM_RESPONSE_TIMEOUT: ${LLM_RESPONSE_TIMEOUT:-60}
160+
BLOCK_EMBEDDING_PROVIDER: ${BLOCK_EMBEDDING_PROVIDER:-openai}
161+
BLOCK_EMBEDDING_MODEL: ${BLOCK_EMBEDDING_MODEL:-text-embedding-3-small}
162+
BLOCK_EMBEDDING_DIM: ${BLOCK_EMBEDDING_DIM:-1536}
163+
BLOCK_EMBEDDING_API_KEY: ${BLOCK_EMBEDDING_API_KEY:-}
164+
BLOCK_EMBEDDING_BASE_URL: ${BLOCK_EMBEDDING_BASE_URL:-}
165+
BLOCK_EMBEDDING_SEARCH_COSINE_DISTANCE_THRESHOLD: ${BLOCK_EMBEDDING_SEARCH_COSINE_DISTANCE_THRESHOLD:-0.8}
158166
DATABASE_URL: postgresql://${DATABASE_USER:-acontext}:${DATABASE_PASSWORD:-helloworld}@acontext-server-pg:5432/${DATABASE_NAME:-acontext}
159167
MQ_URL: amqp://${RABBITMQ_USER:-acontext}:${RABBITMQ_PASSWORD:-helloworld}@acontext-server-rabbitmq:5672/
160168
REDIS_URL: redis://:${REDIS_PASSWORD:-helloworld}@acontext-server-redis:6379
161169
S3_ENDPOINT: http://acontext-server-seaweedfs:9000
162170
OTEL_EXPORTER_OTLP_ENDPOINT: acontext-server-jaeger:4317
163171
volumes:
164-
- ./core/config.yaml:/app/config.yaml
172+
- ./core/config.yaml:/app/config.yaml:ro
165173
ports:
166174
- "${CORE_EXPORT_PORT:-8019}:8000"
167175
depends_on:

0 commit comments

Comments
 (0)