-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
131 lines (124 loc) Β· 4.16 KB
/
Copy pathdocker-compose.yml
File metadata and controls
131 lines (124 loc) Β· 4.16 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: "3.9"
services:
# ββ SPIR FastAPI Backend βββββββββββββββββββββββββββββββββββββββββββββββββββββ
spir-api:
build:
context: .
dockerfile: Dockerfile
container_name: spir-api
restart: unless-stopped
ports:
- "8000:8000"
environment:
- SPIR_ENV=${SPIR_ENV:-production}
- SPIR_API_KEY=${SPIR_API_KEY}
- SPIR_SECRET_KEY=${SPIR_SECRET_KEY}
- POSTGRES_HOST=postgres
- POSTGRES_DB=${POSTGRES_DB:-spir}
- POSTGRES_USER=${POSTGRES_USER:-spir}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- OPENSEARCH_HOST=opensearch
- REDIS_HOST=redis
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_FROM=${SMTP_FROM}
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
- TEAMS_WEBHOOK_URL=${TEAMS_WEBHOOK_URL}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
opensearch:
condition: service_healthy
volumes:
- spir-forensics:/var/spir/forensics
networks:
- spir-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# ββ React Dashboard (served by Nginx) ββββββββββββββββββββββββββββββββββββββββ
spir-dashboard:
image: node:20-alpine
container_name: spir-dashboard
restart: unless-stopped
working_dir: /app
command: sh -c "npm install && npm start"
ports:
- "3000:3000"
environment:
- REACT_APP_API_URL=http://localhost:8000
volumes:
- ./dashboard:/app
networks:
- spir-net
# ββ PostgreSQL βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
postgres:
image: postgres:16-alpine
container_name: spir-postgres
restart: unless-stopped
environment:
- POSTGRES_DB=${POSTGRES_DB:-spir}
- POSTGRES_USER=${POSTGRES_USER:-spir}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-spirpassword}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- spir-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-spir}"]
interval: 10s
timeout: 5s
retries: 5
# ββ OpenSearch βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
opensearch:
image: opensearchproject/opensearch:2.12.0
container_name: spir-opensearch
restart: unless-stopped
environment:
- discovery.type=single-node
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-Admin1234!}
- plugins.security.disabled=false
volumes:
- opensearch-data:/usr/share/opensearch/data
ports:
- "9200:9200"
networks:
- spir-net
healthcheck:
test: ["CMD-SHELL", "curl -sk https://localhost:9200 -u admin:${OPENSEARCH_PASSWORD:-Admin1234!} | grep -q 'cluster_name'"]
interval: 30s
timeout: 15s
retries: 5
# ββ Redis ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
redis:
image: redis:7-alpine
container_name: spir-redis
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD:-spirredis}
volumes:
- redis-data:/data
ports:
- "6379:6379"
networks:
- spir-net
healthcheck:
test: ["CMD", "redis-cli", "--no-auth-warning", "-a", "${REDIS_PASSWORD:-spirredis}", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data:
opensearch-data:
redis-data:
spir-forensics:
networks:
spir-net:
driver: bridge