-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (80 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
84 lines (80 loc) · 1.78 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
services:
# Apache Solr service
solr:
image: solr:8.11.4
container_name: heline-solr
ports:
- "8983:8983"
volumes:
- solr_data:/var/solr
command: >
bash -c "
mkdir -p /var/solr/data/heline/conf &&
cp -r /opt/solr/server/solr/configsets/_default/conf/* /var/solr/data/heline/conf/ &&
solr-precreate heline &&
exec solr -f
"
networks:
- heline-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/"]
interval: 10s
timeout: 5s
retries: 5
# Heline Go application
heline-app:
build:
context: .
dockerfile: Dockerfile
container_name: heline-app
ports:
- "8000:8000"
environment:
- SOLR_BASE_URL=http://solr:8983
- SOLR_PORT=8983
- INDEXER_URL=http://heline-indexer:8080
- DOCKER_ENV=true
links:
- heline-indexer
depends_on:
solr:
condition: service_healthy
networks:
- heline-network
volumes:
- .:/app
- app_data:/app/_build
working_dir: /app
command: bash -c "cp /heline /app/ && /app/heline server start"
# Heline Indexer API Service (Rust application)
heline-indexer:
build:
context: ./heline-indexer
dockerfile: Dockerfile
container_name: heline-indexer
ports:
- "8080:8080"
environment:
- SOLR_BASE_URL=http://solr:8983
- API_PORT=8080
volumes:
- indexer_repos:/app/repos
depends_on:
solr:
condition: service_healthy
networks:
- heline-network
command: >
bash -c "
./heline-indexer api
"
networks:
heline-network:
driver: bridge
volumes:
solr_data:
driver: local
app_data:
driver: local
indexer_repos:
driver: local