690517:1449 204 and 302 refactor #03
CI / CD Pipeline / build (push) Failing after 42s
CI / CD Pipeline / deploy (push) Has been skipped

This commit is contained in:
2026-05-17 14:49:45 +07:00
parent 544bb30277
commit 50bffdf38a
53 changed files with 4026 additions and 617 deletions
@@ -175,81 +175,3 @@ services:
backend:
condition: service_healthy
# ----------------------------------------------------------------
# 3. ClamAV (Antivirus scanning for file uploads — ADR-016)
# Service Name: clamav (Backend อ้างอิง CLAMAV_HOST=clamav, port 3310)
# ----------------------------------------------------------------
clamav:
<<: [*restart_policy, *default_logging]
image: clamav/clamav:1.4.4
container_name: clamav
deploy:
resources:
limits:
cpus: '1.0'
memory: 2G
reservations:
cpus: '0.25'
memory: 1G
environment:
CLAMAV_NO_LOG_FILE: 'true' # ปิดการเขียนไฟล์ clamd.log
FRESHCLAM_NO_LOG_FILE: 'true' # ปิดการเขียนไฟล์ freshclam.log
TZ: 'Asia/Bangkok'
CLAMAV_NO_FRESHCLAMD: 'false'
CLAMAV_NO_CLAMD: 'false'
CLAMD_STARTUP_TIMEOUT: '1800'
networks:
- lcbp3
volumes:
# cache definitions เพื่อไม่ต้อง download ทุกครั้งที่ restart
- '/share/np-dms/clamav/data:/var/lib/clamav'
- '/share/np-dms/data/logs/clamav:/var/log/clamav'
healthcheck:
test: ['CMD', 'clamdcheck.sh']
interval: 60s
timeout: 30s
retries: 3
start_period: 300s
# ----------------------------------------------------------------
# 4. Qdrant (Vector Database for RAG — ADR-023A)
# Service Name: qdrant (Backend อ้างอิง QDRANT_HOST=qdrant, port 6333)
# ----------------------------------------------------------------
qdrant:
<<: [*restart_policy, *default_logging]
image: qdrant/qdrant:v1.7.0
container_name: qdrant
deploy:
resources:
limits:
cpus: '1.0'
memory: 2G
reservations:
cpus: '0.25'
memory: 512M
environment:
TZ: 'Asia/Bangkok'
QDRANT__SERVICE__GRPC_PORT: '6334'
QDRANT__LOG_LEVEL: 'INFO'
networks:
- lcbp3
ports:
- '6333:6333' # HTTP API
- '6334:6334' # gRPC API
volumes:
- '/share/np-dms/qdrant/storage:/qdrant/storage'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:6333/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# sudo chown -R 100:101 /share/np-dms/data/logs/clamav
# sudo chmod -R 755 /share/np-dms/data/logs/climax
# sudo chown -R 100:101 /share/np-dms/clamav/data
# sudo chmod -R 775 /share/np-dms/clamav/data
# sudo mkdir -p /share/np-dms/qdrant/storage
# sudo chown -R 100:101 /share/np-dms/qdrant/storage