Skip to content

Commit

Permalink
update to bookworm and migrate to valkey
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr88 committed Dec 25, 2024
1 parent fe33c9f commit d199c30
Show file tree
Hide file tree
Showing 20 changed files with 457 additions and 335 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye",
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ duckduckgo-search = {extras = ["lxml"], version = "*"}
brotli = "*"
python-magic = "*"
pillow = "*"
valkey = {extras = ["libvalkey"], version = "*"}

[dev-packages]
autopep8 = "*"
Expand Down
130 changes: 128 additions & 2 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# from plugins.docker import Docker
from plugins.pushups import Pushups
from plugins.redistool import RedisTool
from plugins.valkeytool import ValkeyTool
from plugins.shellcmds import ShellCmds
from plugins.tts import TTS
from plugins.users import Users
Expand Down Expand Up @@ -53,7 +53,7 @@
Pushups(),
TTS(),
ShellCmds(),
RedisTool(),
ValkeyTool(),
# Ollama(),
HIPB(),
Calc(),
Expand Down
19 changes: 5 additions & 14 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ services:
restart: unless-stopped
#build: .
environment:
REDIS_HOST: redis
REDIS_DB: 0
VALKEY_HOST: valkey
VALKEY_DB: 0
links:
- redis
- valkey
labels:
com.centurylinklabs.watchtower.scope: mmchatgpt
command: [ 'python', 'bot.py' ]
Expand All @@ -16,20 +16,11 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- app-data:/app-data
redis:
image: redis:7.2.5-alpine
valkey:
image: valkey/valkey:8.0.1-alpine
restart: unless-stopped
volumes:
- redis-data:/data
command:
[
'redis-server',
'--save',
'60',
'1',
'--loglevel',
'warning'
]
expose:
- "6379"
#watchtower:
Expand Down
Loading

0 comments on commit d199c30

Please sign in to comment.