changes to src/events/messageCreate.ts, Dockerfile, Modelfile, docker-compose.yml
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
FROM node:jod-alpine
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
COPY package.json package-lock.json tsconfig.json ./
|
||||
COPY src/ ./src/
|
||||
COPY src/personality.json ./src/
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
CMD ["npm", "run", "prod"]
|
||||
|
||||
@@ -17,9 +17,9 @@ services:
|
||||
ipv4_address: ${DISCORD_IP}
|
||||
volumes:
|
||||
- discord:/app/data
|
||||
- ./src:/app/src # Mount src/ to ensure personality.json is available
|
||||
- ./src:/app/src
|
||||
redis:
|
||||
image: redis:alpine # Use alpine for smaller footprint
|
||||
image: redis:alpine
|
||||
container_name: redis
|
||||
restart: always
|
||||
networks:
|
||||
|
||||
@@ -16,10 +16,16 @@ const client = new Client({
|
||||
]
|
||||
})
|
||||
|
||||
// Initialize Redis connection
|
||||
export const redis = createClient({
|
||||
url: `redis://${Keys.redisHost}:${Keys.redisPort}`,
|
||||
})
|
||||
url: `redis://${Keys.redisHost}:${Keys.redisPort}`,
|
||||
socket: {
|
||||
reconnectStrategy: (retries) => Math.min(retries * 100, 3000),
|
||||
},
|
||||
});
|
||||
|
||||
redis.on('error', (err) => console.log(`Redis error: ${err}`));
|
||||
redis.on('connect', () => console.log('Redis connected'));
|
||||
redis.connect().catch((err) => console.log(`Redis connection failed: ${err}`));
|
||||
|
||||
// Initialize Ollama connection
|
||||
export const ollama = new Ollama({
|
||||
|
||||
Reference in New Issue
Block a user