-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.8 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3.8'
networks:
shiva_pot:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
services:
postgres:
image: postgres:16 # Specify PostgreSQL version 16
container_name: postgres_container # Name of the container
restart: always # Restart policy
environment:
POSTGRES_USER: username # Set the database user
POSTGRES_PASSWORD: password # Set the database password
POSTGRES_DB: shiva-pot # Set the default database name
ports:
- "5432:5432" # Map port 5432 on host to port 5432 on container
healthcheck:
test: ["CMD", "pg_isready", "-U", "username", "-d", "postgres"]
interval: 10s # How often to check the health
retries: 5 # Number of retries before considering the container unhealthy
start_period: 30s # Time to wait for the container to initialize before starting health checks
timeout: 5s
volumes:
- ./data/postgres:/var/lib/postgresql/data # Persist data in a named
networks:
- shiva_pot
analyzer:
build:
context: ./analyzer/src
dockerfile: Dockerfile
container_name: shiva-analyzer
volumes:
- ./data/mails:/tmp/spam_queue
environment:
SSDEEP_SIMILARITY_THRESHOLD: 95
networks:
- shiva_pot
depends_on:
postgres:
condition: service_healthy
user: "${UID}:${GID}" # Use host's user and group IDs
receiver:
build:
context: ./receiver/src
dockerfile: Dockerfile
container_name: shiva-receiver
volumes:
- ./data/mails:/tmp/spam_queue
networks:
- shiva_pot
ports:
- "2525:2525"
environment:
QUEUE_DIR: /tmp/spam_queue/
SHIVA_HOST: 0.0.0.0
SHIVA_PORT: 2525
user: "${UID}:${GID}" # Use host's user and group IDs
# volumes:
# postgres_data: