-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to SB 3.4 and polish observability (#130)
* upgrade to SB 3.4 and polish observability * upgrade docker * fix : tests * polish
- Loading branch information
1 parent
b037b5c
commit 8815e97
Showing
10 changed files
with
177 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,62 @@ | ||
services: | ||
ollama: | ||
image: langchain4j/ollama-llama3:latest | ||
ports: | ||
- '11434:11434' | ||
redis-stack: | ||
image: redis/redis-stack-server | ||
ports: | ||
- '6379:6379' | ||
lgtm-stack: | ||
image: grafana/otel-lgtm:0.8.0 | ||
extra_hosts: ['host.docker.internal:host-gateway'] | ||
container_name: lgtm-stack | ||
environment: | ||
- OTEL_METRIC_EXPORT_INTERVAL=500 | ||
ports: | ||
- "3000:3000" | ||
- "4317:4317" | ||
- "4318:4318" | ||
|
||
ollama: | ||
container_name: ollama | ||
image: ollama/ollama:latest | ||
ports: | ||
- '11434:11434' | ||
|
||
postgresqldb: | ||
container_name: postgresqldb | ||
image: pgvector/pgvector:pg17 | ||
extra_hosts: [ 'host.docker.internal:host-gateway' ] | ||
restart: always | ||
environment: | ||
- POSTGRES_USER=appuser | ||
- POSTGRES_PASSWORD=secret | ||
- POSTGRES_DB=appdb | ||
- PGPASSWORD=secret | ||
logging: | ||
options: | ||
max-size: 10m | ||
max-file: "3" | ||
ports: | ||
- '5432:5432' | ||
healthcheck: | ||
test: "pg_isready -U appuser -d appdb" | ||
interval: 2s | ||
timeout: 20s | ||
retries: 10 | ||
|
||
pgadmin: | ||
container_name: pgadmin_container | ||
image: dpage/pgadmin4 | ||
extra_hosts: [ 'host.docker.internal:host-gateway' ] | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]} | ||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} | ||
PGADMIN_CONFIG_SERVER_MODE: "False" | ||
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False" | ||
ports: | ||
- "${PGADMIN_PORT:-5050}:80" | ||
depends_on: | ||
postgresqldb: | ||
condition: service_healthy | ||
volumes: | ||
- ./docker_pgadmin_servers.json:/pgadmin4/servers.json | ||
entrypoint: | ||
- "/bin/sh" | ||
- "-c" | ||
- "/bin/echo 'postgresqldb:5432:*:appuser:secret' > /tmp/pgpassfile && chmod 600 /tmp/pgpassfile && /entrypoint.sh" | ||
|
||
lgtm-stack: | ||
image: grafana/otel-lgtm:0.8.1 | ||
extra_hosts: [ 'host.docker.internal:host-gateway' ] | ||
container_name: lgtm-stack | ||
environment: | ||
- OTEL_METRIC_EXPORT_INTERVAL=500 | ||
ports: | ||
- "3000:3000" | ||
- "4317:4317" | ||
- "4318:4318" | ||
- "9090:9090" |
14 changes: 14 additions & 0 deletions
14
rag/rag-springai-ollama-llm/docker/docker_pgadmin_servers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Servers": { | ||
"1": { | ||
"Name": "Docker Compose DB", | ||
"Group": "Servers", | ||
"Port": 5432, | ||
"Username": "appuser", | ||
"Host": "postgresqldb", | ||
"SSLMode": "prefer", | ||
"MaintenanceDB": "appdb", | ||
"PassFile": "/tmp/pgpassfile" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
...-llm/src/main/java/com/learning/ai/llmragwithspringai/config/RestClientBuilderConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
rag/rag-springai-ollama-llm/src/main/resources/application-local.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## WARNING: Development-only configuration | ||
## The following setting will DELETE existing vector store data on startup | ||
spring.ai.vectorstore.pgvector.removeExistingVectorStoreTable=true | ||
spring.ai.ollama.baseUrl=http://localhost:11434 | ||
|
||
|
||
logging.level.org.springframework.ai.rag=debug | ||
|
||
spring.datasource.url=jdbc:postgresql://localhost/appdb | ||
spring.datasource.username=appuser | ||
spring.datasource.password=secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
rag/rag-springai-ollama-llm/src/main/resources/logback-spring.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/base.xml" /> | ||
|
||
<appender name="OpenTelemetry" | ||
class="io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender"> | ||
<captureExperimentalAttributes>true</captureExperimentalAttributes> | ||
<captureCodeAttributes>true</captureCodeAttributes> | ||
<captureKeyValuePairAttributes>true</captureKeyValuePairAttributes> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="OpenTelemetry"/> | ||
</root> | ||
|
||
</configuration> |
Oops, something went wrong.