Compare commits

...

3 Commits

Author SHA1 Message Date
mudler
4f555132fa chore(mcpbox): use dind
Signed-off-by: mudler <mudler@localai.io>
2025-04-25 17:05:20 +02:00
Richard Palethorpe
15efd2d527 fix(docker): Add mcpbox server to extended compose files (#84)
Signed-off-by: Richard Palethorpe <io@richiejp.com>
2025-04-25 17:04:06 +02:00
Ettore Di Giacinto
5e3bc0f89b fix(discord): automatically add 'Bot' prefix to token if missing (#83)
Signed-off-by: mudler <mudler@localai.io>
2025-04-25 16:20:29 +02:00
4 changed files with 44 additions and 4 deletions

View File

@@ -12,6 +12,16 @@ services:
- /dev/dri/card1 - /dev/dri/card1
- /dev/dri/renderD129 - /dev/dri/renderD129
mcpbox:
extends:
file: docker-compose.yaml
service: mcpbox
dind:
extends:
file: docker-compose.yaml
service: dind
localrecall: localrecall:
extends: extends:
file: docker-compose.yaml file: docker-compose.yaml

View File

@@ -17,6 +17,16 @@ services:
count: 1 count: 1
capabilities: [gpu] capabilities: [gpu]
mcpbox:
extends:
file: docker-compose.yaml
service: mcpbox
dind:
extends:
file: docker-compose.yaml
service: dind
localrecall: localrecall:
extends: extends:
file: docker-compose.yaml file: docker-compose.yaml
@@ -30,4 +40,4 @@ services:
localagi: localagi:
extends: extends:
file: docker-compose.yaml file: docker-compose.yaml
service: localagi service: localagi

View File

@@ -54,14 +54,28 @@ services:
- "8080" - "8080"
volumes: volumes:
- ./volumes/mcpbox:/app/data - ./volumes/mcpbox:/app/data
# share docker socket if you want it to be able to run docker commands environment:
- /var/run/docker.sock:/var/run/docker.sock - DOCKER_HOST=tcp://dind:2375
depends_on:
dind:
condition: service_healthy
healthcheck: healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8080/processes"] test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8080/processes"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
dind:
image: docker:dind
privileged: true
environment:
- DOCKER_TLS_CERTDIR=""
healthcheck:
test: ["CMD", "docker", "info"]
interval: 10s
timeout: 5s
retries: 3
localagi: localagi:
depends_on: depends_on:
localai: localai:

View File

@@ -30,9 +30,15 @@ func NewDiscord(config map[string]string) *Discord {
duration = 5 * time.Minute duration = 5 * time.Minute
} }
token := config["token"]
if !strings.HasPrefix(token, "Bot ") {
token = "Bot " + token
}
return &Discord{ return &Discord{
conversationTracker: NewConversationTracker[string](duration), conversationTracker: NewConversationTracker[string](duration),
token: config["token"], token: token,
defaultChannel: config["defaultChannel"], defaultChannel: config["defaultChannel"],
} }
} }