forked from projectachilles/ProjectAchilles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (99 loc) · 3.3 KB
/
docker-compose.yml
File metadata and controls
104 lines (99 loc) · 3.3 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
services:
backend:
build: ./backend
ports:
- "127.0.0.1:3000:3000"
env_file: ./backend/.env
environment:
- PORT=3000
- NODE_ENV=production
# These can be overridden via .env file in project root or shell environment
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost}
- AGENT_SOURCE_PATH=/agent-src
# Default to local Docker ES (override Cloud settings that may come from env_file).
# To use Elastic Cloud instead, configure via the Settings UI — file-based
# settings take priority over these env vars.
- ELASTICSEARCH_NODE=${ELASTICSEARCH_NODE:-http://elasticsearch:9200}
- ELASTICSEARCH_CLOUD_ID=
- ELASTICSEARCH_API_KEY=
- ELASTICSEARCH_INDEX_PATTERN=${ELASTICSEARCH_INDEX_PATTERN:-achilles-results-*}
volumes:
- achilles-data:/root/.projectachilles
- repo-cache:/app/data
- go-cache:/root/go
- ./agent:/agent-src:ro
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 30s
timeout: 5s
retries: 3
restart: unless-stopped
frontend:
build: ./frontend
# Only pass frontend-safe variables (not backend secrets like CLERK_SECRET_KEY)
environment:
- CLERK_PUBLISHABLE_KEY=${CLERK_PUBLISHABLE_KEY:-}
- VITE_CLERK_PUBLISHABLE_KEY=${VITE_CLERK_PUBLISHABLE_KEY:-}
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost}
ports:
- "127.0.0.1:80:80"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
wiki:
build: ./wiki
ports:
- "127.0.0.1:3001:80"
restart: unless-stopped
# ---------------------------------------------------------------------------
# Optional: Local Elasticsearch for analytics
# Activate with: docker compose --profile elasticsearch up -d
# ---------------------------------------------------------------------------
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
profiles: ["elasticsearch"]
container_name: achilles-es
environment:
- discovery.type=single-node
- xpack.security.enabled=false # DEV ONLY — enable xpack.security for production Docker deployments
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx1024m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- "127.0.0.1:9200:9200"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
deploy:
resources:
limits:
memory: 2G
restart: unless-stopped
# One-shot container: creates index + seeds ~1000 records, then exits
es-seed:
image: python:3.12-slim
profiles: ["elasticsearch"]
depends_on:
elasticsearch:
condition: service_healthy
volumes:
- ./scripts:/scripts:ro
entrypoint: >
sh -c "pip install -q 'elasticsearch==8.17.2' &&
python /scripts/generate_synthetic_data.py -c 1000 -o /tmp/seed.ndjson -d 30 &&
python /scripts/upload_to_elasticsearch.py -f /tmp/seed.ndjson --host http://elasticsearch:9200 --create-index"
restart: "no"
volumes:
achilles-data:
repo-cache:
go-cache:
esdata: