fix: rename BullMQ queue to avoid colon (not allowed in newer versions)
- codeboard:generate → codeboard-generate in worker and web - Update docker-compose: remove postgres (unused), use non-conflicting ports - Exclude tests/ from Docker build context
This commit is contained in:
@@ -12,3 +12,5 @@ tmp
|
|||||||
.vercel
|
.vercel
|
||||||
*.log
|
*.log
|
||||||
.git
|
.git
|
||||||
|
tests
|
||||||
|
README.md
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let queue: Queue | null = null;
|
|||||||
|
|
||||||
export function getQueue(): Queue {
|
export function getQueue(): Queue {
|
||||||
if (!queue) {
|
if (!queue) {
|
||||||
queue = new Queue("codeboard:generate", {
|
queue = new Queue("codeboard-generate", {
|
||||||
connection: getRedis(),
|
connection: getRedis(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const redisUrl = process.env.REDIS_URL ?? "redis://localhost:6379";
|
|||||||
const connection = new IORedis(redisUrl, { maxRetriesPerRequest: null });
|
const connection = new IORedis(redisUrl, { maxRetriesPerRequest: null });
|
||||||
|
|
||||||
const worker = new Worker(
|
const worker = new Worker(
|
||||||
"codeboard:generate",
|
"codeboard-generate",
|
||||||
async (job) => {
|
async (job) => {
|
||||||
console.log(`[worker] Processing job ${job.id}: ${job.data.repoUrl}`);
|
console.log(`[worker] Processing job ${job.id}: ${job.data.repoUrl}`);
|
||||||
return processGenerationJob(job);
|
return processGenerationJob(job);
|
||||||
@@ -28,7 +28,7 @@ worker.on("failed", (job, err) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
worker.on("ready", () => {
|
worker.on("ready", () => {
|
||||||
console.log("[worker] Ready and waiting for jobs on codeboard:generate");
|
console.log("[worker] Ready and waiting for jobs on codeboard-generate");
|
||||||
});
|
});
|
||||||
|
|
||||||
async function shutdown() {
|
async function shutdown() {
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
target: web
|
target: web
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "4100:3000"
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://codeboard:codeboard@db:5432/codeboard
|
|
||||||
- REDIS_URL=redis://redis:6379
|
- REDIS_URL=redis://redis:6379
|
||||||
- NEXTAUTH_URL=http://localhost:3000
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
redis:
|
||||||
- redis
|
condition: service_started
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
@@ -19,37 +17,21 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
target: worker
|
target: worker
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://codeboard:codeboard@db:5432/codeboard
|
|
||||||
- REDIS_URL=redis://redis:6379
|
- REDIS_URL=redis://redis:6379
|
||||||
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
||||||
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
||||||
- LLM_MODEL=${LLM_MODEL:-}
|
- LLM_MODEL=${LLM_MODEL:-}
|
||||||
- LLM_BASE_URL=${LLM_BASE_URL:-}
|
- LLM_BASE_URL=${LLM_BASE_URL:-}
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
redis:
|
||||||
- redis
|
condition: service_started
|
||||||
restart: always
|
|
||||||
|
|
||||||
db:
|
|
||||||
image: postgres:16-alpine
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: codeboard
|
|
||||||
POSTGRES_PASSWORD: codeboard
|
|
||||||
POSTGRES_DB: codeboard
|
|
||||||
volumes:
|
|
||||||
- postgres_data:/var/lib/postgresql/data
|
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
ports:
|
|
||||||
- "6379:6379"
|
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- codeboard_redis_data:/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
codeboard_redis_data:
|
||||||
redis_data:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user