-
Notifications
You must be signed in to change notification settings - Fork 122
/
docker-compose.yml
66 lines (61 loc) · 1.83 KB
/
docker-compose.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
65
66
version: '3'
services:
elasticsearch:
container_name: django_elasticsearch_dsl_drf_elasticsearch
build:
context: .
dockerfile: ./docker/elasticsearch/Dockerfile
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
environment:
# - bootstrap.memory_lock=true
- discovery.type=single-node
- xpack.security.enabled=false
- cluster.routing.allocation.disk.watermark.low=97%
- cluster.routing.allocation.disk.watermark.high=98%
- cluster.routing.allocation.disk.watermark.flood_stage=99%
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
backend:
container_name: django_elasticsearch_dsl_drf_backend
image: django_elasticsearch_dsl_drf_backend:latest
build:
context: .
dockerfile: ./docker/backend/Dockerfile
# command: bash -l -c "python3.6 examples/simple/manage.py search_index --rebuild -f --settings=settings.docker && python3.6 examples/simple/manage.py runserver 0.0.0.0:8000 --settings=settings.docker"
volumes:
- .:/backend
- ./docker/backend:/docker/backend
ports:
- "8000:8000"
depends_on:
- elasticsearch
links:
- elasticsearch:elasticsearch
entrypoint:
- /backend/docker/backend/entrypoint.sh
environment:
- DJANGO_SETTINGS_MODULE=settings.docker
frontend:
container_name: django_elasticsearch_dsl_drf_frontend
image: django_elasticsearch_dsl_drf_frontend:latest
build:
context: .
dockerfile: ./docker/frontend/Dockerfile
command: bash -l -c "cd /frontend/ && yarn dev"
volumes:
- ./examples/frontend/:/frontend
- node_modules:/frontend/node_modules
- ./docker/frontend:/docker/frontend
- .:/code
ports:
- "3000:3000"
depends_on:
- backend
- elasticsearch
volumes:
data:
esdata:
node_modules: