-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
155 lines (147 loc) · 4.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
155 lines (147 loc) · 4.71 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
services:
# Core Services
postgres:
image: postgres:15.6-alpine
container_name: mobilicustos-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-mobilicustos}
POSTGRES_USER: ${POSTGRES_USER:-mobilicustos}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
# Host-side port. Defaults to 5432; override via POSTGRES_HOST_PORT when
# the host has 5432 reserved (e.g. Windows Hyper-V dynamic port exclusion).
- "127.0.0.1:${POSTGRES_HOST_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-mobilicustos}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- mobilicustos
neo4j:
image: neo4j:5.26-community
container_name: mobilicustos-neo4j
environment:
NEO4J_AUTH: ${NEO4J_USER:-neo4j}/${NEO4J_PASSWORD:-changeme}
NEO4J_PLUGINS: '["apoc"]'
NEO4J_dbms_security_procedures_unrestricted: apoc.*
volumes:
- neo4j_data:/data
ports:
- "127.0.0.1:7474:7474"
- "127.0.0.1:7687:7687"
healthcheck:
test: ["CMD", "neo4j", "status"]
interval: 10s
timeout: 5s
retries: 5
networks:
- mobilicustos
redis:
image: redis:7.4-alpine
container_name: mobilicustos-redis
volumes:
- redis_data:/data
ports:
- "127.0.0.1:6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- mobilicustos
# API Service
api:
build:
context: .
dockerfile: api/Dockerfile
container_name: mobilicustos-api
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-mobilicustos}
- POSTGRES_USER=${POSTGRES_USER:-mobilicustos}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=${NEO4J_USER:-neo4j}
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-changeme}
- REDIS_URL=redis://redis:6379
# ADB: Connect to host ADB server for USB device access
- ADB_SERVER_SOCKET=tcp:host.docker.internal:5037
# Frida: TCP tunnel to frida-server on device (via adb forward on host)
- FRIDA_SERVER_HOST=host.docker.internal:27042
# Host temp path for analyzer containers (must exist on host and be writable)
- ANALYZER_TEMP_PATH=/tmp/mobilicustos_analyzer
volumes:
- ./api:/app/api:ro
- ./uploads:/app/uploads
- ./reports:/app/reports
# Shared temp directory for analyzer files (same path in container and on host)
- /tmp/mobilicustos_analyzer:/tmp/mobilicustos_analyzer
# Docker socket: Use DOCKER_SOCKET_PATH env var for Windows compatibility
# Windows: set DOCKER_SOCKET_PATH=//var/run/docker.sock or //./pipe/docker_engine
- ${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock
# USB device passthrough for iOS device support (libimobiledevice + usbmuxd).
# Requires usbipd-win on the host with the iPhone attached to the docker-desktop
# WSL distro (or similar). On Mac, mount /var/run/usbmuxd instead.
- /dev/bus/usb:/dev/bus/usb
# privileged is required for usbmuxd to claim USB device interfaces.
# Tighter alternatives (cap_add SYS_ADMIN + device cgroup rules) are fragile
# across Docker Desktop versions; privileged is the documented pattern.
privileged: true
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
neo4j:
condition: service_healthy
redis:
condition: service_healthy
networks:
- mobilicustos
# Frontend Service
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mobilicustos-frontend
ports:
- "3000:80"
depends_on:
- api
networks:
- mobilicustos
# Report Processor
report-processor:
build:
context: ./report-processor
dockerfile: Dockerfile
container_name: mobilicustos-report-processor
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-mobilicustos}
- POSTGRES_USER=${POSTGRES_USER:-mobilicustos}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
volumes:
- ./reports:/app/reports:ro
- ./knowledge-base:/app/knowledge-base:ro
depends_on:
postgres:
condition: service_healthy
networks:
- mobilicustos
# On-Demand Analyzer Base Images (built but not always running)
# These are spawned by the API when needed
volumes:
postgres_data:
neo4j_data:
redis_data:
networks:
mobilicustos:
driver: bridge