-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-elastic.yml
64 lines (64 loc) · 1.59 KB
/
docker-compose-elastic.yml
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
version: '3.9'
services:
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.1
container_name: myblog-search-elastic
environment:
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- type: volume
source: elastic-data
target: /usr/share/elasticsearch/data
ports:
- 9200:9200
deploy:
resources:
limits:
memory: 4G
middleware:
image: sean1975/myblog-search:middleware
container_name: myblog-search-middleware
hostname: myblog-search-middleware
ports:
- 8000:80
environment:
- BACKEND_URL=http://host.docker.internal:9200
- BACKEND_TYPE=elastic
nginx:
image: nginx:1.21.0
container_name: myblog-search-nginx
hostname: myblog-search-nginx
ports:
- 80:80
environment:
- MIDDLEWARE_URL=http://host.docker.internal:8000
volumes:
- type: bind
source: ./nginx/etc/nginx.conf
target: /etc/nginx/nginx.conf
read_only: true
- type: bind
source: ./nginx/etc/templates/default.conf.template
target: /etc/nginx/templates/default.conf.template
read_only: true
- type: bind
source: ./nginx/html
target: /usr/share/nginx/html
read_only: true
- type: bind
source: ./nginx/css
target: /usr/share/nginx/css
read_only: true
- type: bind
source: ./nginx/js
target: /usr/share/nginx/js
read_only: true
volumes:
elastic-data:
driver: local
crawler-backup:
driver: local