latest code
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
x-logging: &default-logging
|
||||
driver: "local"
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
compress: "true"
|
||||
|
||||
services:
|
||||
|
||||
redis:
|
||||
image: redis:8.2-alpine
|
||||
container_name: redis_docqube_production
|
||||
restart: always
|
||||
env_file:
|
||||
- .env.production
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
redis-server \
|
||||
--requirepass "$$REDIS_PASSWORD" \
|
||||
--appendonly yes \
|
||||
--maxmemory 512mb \
|
||||
--maxmemory-policy allkeys-lru
|
||||
volumes:
|
||||
- redis_docqube_production:/data
|
||||
networks:
|
||||
- docqube_production
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli -a \"$$REDIS_PASSWORD\" ping | grep PONG"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
logging: *default-logging
|
||||
|
||||
qdrant:
|
||||
image: qdrant/qdrant:v1.19.0
|
||||
container_name: qdrant_docqube_production
|
||||
restart: always
|
||||
volumes:
|
||||
- qdrant_docqube_production:/qdrant/storage
|
||||
networks:
|
||||
- docqube_production
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "cat /proc/net/tcp | grep -i 18BD"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
logging: *default-logging
|
||||
|
||||
clamav:
|
||||
image: clamav/clamav-debian:1.4_base
|
||||
container_name: clamav_container_production
|
||||
restart: always
|
||||
environment:
|
||||
- CLAMD_CONF_ConcurrentDatabaseReload=no
|
||||
volumes:
|
||||
- clamav_data_production:/var/lib/clamav
|
||||
networks:
|
||||
- docqube_production
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 2G
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "nc -z 127.0.0.1 3310"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 60s
|
||||
logging: *default-logging
|
||||
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: docqube_backend:production
|
||||
pull_policy: never
|
||||
container_name: docqube_api_production
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.production
|
||||
ports:
|
||||
- "20001:20001"
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
qdrant:
|
||||
condition: service_healthy
|
||||
clamav:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- docqube_production
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:20001/api/health/live', timeout=3).read()\""
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
logging: *default-logging
|
||||
|
||||
worker:
|
||||
image: docqube_backend:production
|
||||
pull_policy: never
|
||||
container_name: docqube_worker_production
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- celery
|
||||
- -A
|
||||
- app.tasks.celery_app:celery_app
|
||||
- worker
|
||||
- --loglevel=info
|
||||
env_file:
|
||||
- .env.production
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
qdrant:
|
||||
condition: service_healthy
|
||||
clamav:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- docqube_production
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"celery -A app.tasks.celery_app:celery_app inspect ping -d celery@$$HOSTNAME | grep -q pong"
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
logging: *default-logging
|
||||
|
||||
networks:
|
||||
docqube_production:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
redis_docqube_production:
|
||||
qdrant_docqube_production:
|
||||
clamav_data_production:
|
||||
Reference in New Issue
Block a user