-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.offline.yml
More file actions
137 lines (130 loc) · 4 KB
/
docker-compose.offline.yml
File metadata and controls
137 lines (130 loc) · 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
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
# docker-compose.offline.yml
#
# Offline deployment variant — uses pre-built images loaded via scripts/load-images.sh
# instead of building from source.
#
# Prerequisites:
# 1. On an internet-connected machine: bash scripts/pull-and-save-images.sh
# 2. Transfer images/, this file, and .env to the offline machine.
# 3. On the offline machine: bash scripts/load-images.sh
#
# Start: docker compose -f docker-compose.offline.yml up -d
# Stop: docker compose -f docker-compose.offline.yml down
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: tracepcap-postgres
environment:
POSTGRES_DB: tracepcap
POSTGRES_USER: tracepcap_user
POSTGRES_PASSWORD: tracepcap_pass
TZ: Asia/Singapore
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tracepcap_user -d tracepcap"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tracepcap-network
# MinIO Object Storage
minio:
image: minio/minio:RELEASE.2025-04-22T22-12-26Z
container_name: tracepcap-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
TZ: Asia/Singapore
ports:
- "9000:9000" # API
- "9001:9001" # Console
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- tracepcap-network
# MinIO Client (mc) - Create bucket on startup
minio-init:
image: minio/mc:RELEASE.2025-08-13T08-35-41Z
container_name: tracepcap-minio-init
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/tracepcap-files --ignore-existing;
/usr/bin/mc anonymous set public myminio/tracepcap-files;
exit 0;
"
networks:
- tracepcap-network
# Spring Boot Backend (pre-built image)
backend:
image: tracepcap-backend:latest
container_name: tracepcap-backend
environment:
SPRING_PROFILES_ACTIVE: dev
DATABASE_URL: jdbc:postgresql://postgres:5432/tracepcap
DATABASE_USERNAME: tracepcap_user
DATABASE_PASSWORD: tracepcap_pass
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: tracepcap-files
APP_MEMORY_MB: ${APP_MEMORY_MB:-2048}
LLM_API_BASE_URL: ${LLM_API_BASE_URL:-http://localhost:1234/v1}
LLM_API_KEY: ${LLM_API_KEY:-your-api-key-here}
LLM_MODEL: ${LLM_MODEL:-gpt-4}
LLM_TEMPERATURE: ${LLM_TEMPERATURE:-0.7}
LLM_MAX_TOKENS: ${LLM_MAX_TOKENS:-2000}
LLM_CONTEXT_LENGTH: ${LLM_CONTEXT_LENGTH:-}
LLM_TIMEOUT: ${LLM_TIMEOUT:-300}
# Network Intelligence cluster limits
INTELLIGENCE_MAX_CLUSTERS: ${INTELLIGENCE_MAX_CLUSTERS:-60}
INTELLIGENCE_MAX_EDGES: ${INTELLIGENCE_MAX_EDGES:-200}
TZ: Asia/Singapore
volumes:
- config_data:/app/config
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
networks:
- tracepcap-network
# Nginx - Serves frontend and proxies API to backend (pre-built image)
# Note: frontend build args (VITE_*) are baked into this image at build time.
# To change them, rebuild the image with pull-and-save-images.sh.
nginx:
image: tracepcap-nginx:latest
container_name: tracepcap-nginx
environment:
APP_MEMORY_MB: ${APP_MEMORY_MB:-2048}
LLM_TIMEOUT: ${LLM_TIMEOUT:-300}
TZ: Asia/Singapore
ports:
- "${NGINX_PORT:-80}:80"
depends_on:
- backend
networks:
- tracepcap-network
volumes:
postgres_data:
driver: local
minio_data:
driver: local
config_data:
driver: local
networks:
tracepcap-network:
driver: bridge