Implement job queue for asynchronous NLP #6

Merged
dylan merged 14 commits from feat/implement-job-queue into main 2026-03-03 14:26:38 +00:00
2 changed files with 52 additions and 4 deletions
Showing only changes of commit f4894759d7 - Show all commits

48
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,48 @@
services:
postgres:
image: postgres:16
container_name: crosspost_db
restart: unless-stopped
env_file:
- .env
ports:
- "5432:5432"
volumes:
- ./server/db/postgres_vol:/var/lib/postgresql/data
- ./server/db/schema.sql:/docker-entrypoint-initdb.d/schema.sql
redis:
image: redis:7
container_name: crosspost_redis
restart: unless-stopped
ports:
- "6379:6379"
backend:
build: .
container_name: crosspost_flask
volumes:
- .:/app
env_file:
- .env
ports:
- "5000:5000"
command: flask --app server.app run --host=0.0.0.0 --debug
depends_on:
- postgres
- redis
worker:
build: .
volumes:
- .:/app
container_name: crosspost_worker
env_file:
- .env
command: >
celery -A server.queue.celery_app.celery worker
--loglevel=info
--pool=solo
depends_on:
- postgres
- redis

View File

@@ -1,7 +1,7 @@
services: services:
postgres: postgres:
image: postgres:16 image: postgres:16
container_name: postgres_db container_name: crosspost_db
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- .env - .env
@@ -13,14 +13,14 @@ services:
redis: redis:
image: redis:7 image: redis:7
container_name: redis container_name: crosspost_redis
restart: unless-stopped restart: unless-stopped
ports: ports:
- "6379:6379" - "6379:6379"
backend: backend:
build: . build: .
container_name: flask_backend container_name: crosspost_flask
env_file: env_file:
- .env - .env
ports: ports:
@@ -32,7 +32,7 @@ services:
worker: worker:
build: . build: .
container_name: celery_worker container_name: crosspost_worker
env_file: env_file:
- .env - .env
command: > command: >