-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
108 lines (99 loc) · 3.04 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
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
version: "3.9"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION:-7.11.1}
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
- "${ES_PORT:-9200}:9200"
networks:
- net1
profiles: ["elasticsearch"]
kibana:
image: docker.elastic.co/kibana/kibana:${ES_VERSION:-7.11.1}
ports:
- "${KIB_PORT:-5601}:5601"
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
networks:
- net1
profiles: ["elasticsearch"]
opensearch:
image: opensearchproject/opensearch:${OPENSEARCH_VERSION:-1.0.0}
environment:
- "bootstrap.memory_lock=true" # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- "discovery.type=single-node"
- "plugins.security.ssl.http.enabled=false" # disable SSL for local dev, do not use in production
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- opensearch-data:/usr/share/opensearch/data
ports:
- "${OPENSEARCH_PORT:-9200}:9200"
networks:
- net1
profiles: ["opensearch"]
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:${OPENSEARCH_VERSION:-1.0.0}
ports:
- "${OPENSEARCH_DASHBOARD_PORT:-5601}:5601"
environment:
OPENSEARCH_HOSTS: '["http://opensearch:9200"]' # must be a string with no spaces when specified as an environment variable
networks:
- net1
profiles: ["opensearch"]
api:
build:
dockerfile: ./api.Dockerfile
context: .
ports:
- "${API_PORT:-8000}:80"
environment:
ES_URL: ${ES_URL:-http://elasticsearch:9200}
OPENSEARCH_URL: ${OPENSEARCH_URL:-http://admin:admin@opensearch:9200}
volumes:
- "./api/:/app/api/" # mount the api directory from the host into the container
networks:
- net1
profiles: ["backend"]
app:
build:
dockerfile: ./app.Dockerfile
context: .
args:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
ports:
- "${APP_PORT:-3000}:3000"
networks:
- net1
profiles: ["frontend"]
scripts:
build:
dockerfile: ./scripts.Dockerfile
context: .
environment:
ES_URL: ${ES_URL:-http://elasticsearch:9200}
OPENSEARCH_URL: ${OPENSEARCH_URL:-http://admin:admin@opensearch:9200}
volumes:
- "./scripts/:/app/scripts/" # mount the scripts directory from the host into the container
- "./data:/data/" # mount the data directory from the host into the container
networks:
- net1
profiles: ["scripts"]
volumes:
es-data:
opensearch-data:
networks:
net1:
driver: bridge