-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (56 loc) · 1.79 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
version: '3.5'
services:
elasticsearch: # Elasticsearch Instance
container_name: elastic-search
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
volumes: # Persist ES data in separate "esdata" volume
- /media/database/esdata:/usr/share/elasticsearch/data
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms750m -Xmx750m"
- discovery.type=single-node
ports: # Expose Elasticsearch ports
- "9300:9300"
- "9200:9200"
app: # flask app
container_name: phencards
build:
context: .
ports:
- "5005:5005" # Expose flask port
environment: # Set ENV vars
- FLASK_APP=app.py
- FLASK_DEBUG=1
- NODE_ENV=local
- ES_HOST=elasticsearch
volumes: # Attach local book data directory
- /media/database:/media/database
- .:/code
depends_on:
- elasticsearch
ulimits:
core:
hard: 0
soft: 0
prod: # flask app
container_name: phencards_production
build:
context: .
ports:
- "5010:5005" # Expose flask port
environment: # Set ENV vars
- FLASK_APP=app.py
- FLASK_DEBUG=1
- NODE_ENV=local
- ES_HOST=elasticsearch
volumes: # Attach local book data directory
- /media/database:/media/database
depends_on:
- elasticsearch
ulimits:
core:
hard: 0
soft: 0
# volumes: # Define separate volume for Elasticsearch data
# esdata: