-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.4 KB
/
docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# SnapVault ClamAV Service
#
# This runs ONLY ClamAV in Docker - your Rails app runs natively
#
# Benefits:
# - Rails development stays fast and native
# - ClamAV is isolated and easily deletable
# - No system pollution from virus scanner
#
# Usage:
# docker-compose up -d clamav # Start only ClamAV
# bin/rails server # Start Rails natively
# docker-compose down -v # Complete cleanup
version: "3.8"
services:
# ClamAV Virus Scanner (isolated in Docker)
clamav:
image: clamav/clamav:latest
container_name: snapvault_clamav
ports:
- "3310:3310" # Expose to host so native Rails can connect
environment:
- CLAMAV_NO_FRESHCLAM=false
- FRESHCLAM_CHECKS=24 # Update definitions every 24 hours
- CLAMD_STARTUP_TIMEOUT=300
- CLAMD_CONF_LogFile=/var/log/clamav/clamd.log
- CLAMD_CONF_LogVerbose=yes
- CLAMD_CONF_TCPSocket=3310
- CLAMD_CONF_TCPAddr=0.0.0.0
volumes:
- clamav_data:/var/lib/clamav
- clamav_logs:/var/log/clamav
healthcheck:
test: ["CMD", "clamdscan", "--ping", "1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 180s # ClamAV needs time to download definitions
restart: unless-stopped
# Volumes for ClamAV data (easy to delete)
volumes:
clamav_data:
name: snapvault_clamav_data
driver: local
clamav_logs:
name: snapvault_clamav_logs
driver: local