-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (100 loc) · 2.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (100 loc) · 2.61 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
version: "3.9"
services:
postgres:
image: postgres:16-alpine
container_name: attackgraph-postgres
restart: unless-stopped
environment:
POSTGRES_DB: attackgraph
POSTGRES_USER: attackgraph
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-attackgraph_dev}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U attackgraph"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
redis:
image: redis:7-alpine
container_name: attackgraph-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
ports:
- "6379:6379"
neo4j:
image: neo4j:5-community
container_name: attackgraph-neo4j
restart: unless-stopped
environment:
NEO4J_AUTH: neo4j/attackgraph
NEO4J_PLUGINS: '["apoc"]'
NEO4J_dbms_security_procedures_unrestricted: apoc.*
volumes:
- neo4j_data:/data
ports:
- "7474:7474"
- "7687:7687"
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:7474 || exit 1"]
interval: 20s
timeout: 10s
retries: 10
start_period: 60s
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: attackgraph-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
neo4j:
condition: service_healthy
env_file:
- .env
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: attackgraph
POSTGRES_USER: attackgraph
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-attackgraph_dev}
REDIS_URL: redis://redis:6379/0
NEO4J_URI: bolt://neo4j:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: attackgraph
CORS_ORIGINS: '["http://localhost:5173","http://localhost:3000","http://localhost:80"]'
ports:
- "8000:8000"
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/api/v1/health')\""]
interval: 30s
timeout: 10s
start_period: 20s
retries: 3
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: attackgraph-frontend
restart: unless-stopped
depends_on:
- backend
ports:
- "3000:80"
volumes:
postgres_data:
redis_data:
neo4j_data: