mirror of
https://git.victorphan.net/basketballcantho/ten-project.git
synced 2026-08-05 09:53:10 +07:00
colaborative tích hợp redis để đồng bộ toàn bộ annotation
This commit is contained in:
@@ -18,6 +18,19 @@ services:
|
||||
networks:
|
||||
- lms_net
|
||||
|
||||
# ── Redis (temp annotation cache) ────────────────────────────────────────────
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
command: redis-server --save "" --appendonly no # in-memory only, no disk writes
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
networks:
|
||||
- lms_net
|
||||
|
||||
# ── FastAPI backend ───────────────────────────────────────────────────────────
|
||||
backend:
|
||||
image: ${BACKEND_IMAGE:-lms-backend:latest}
|
||||
@@ -28,12 +41,15 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: postgresql+psycopg2://${POSTGRES_USER:-lms_user}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-lms_db}
|
||||
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
|
||||
JWT_ALGORITHM: HS256
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-60}
|
||||
UPLOAD_DIR: /uploads
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
volumes:
|
||||
- pdf_uploads:/uploads
|
||||
expose:
|
||||
|
||||
Reference in New Issue
Block a user