-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
94 lines (92 loc) · 1.96 KB
/
docker-compose.yaml
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
version: '3.7'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
container_name: elasticsearch1
environment:
- node.name=elasticsearch1
- cluster.name=docker-cluster
- cluster.initial_master_nodes=elasticsearch1
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024M -Xmx1024M"
- http.cors.enabled=true
- http.cors.allow-origin=*
- network.host=_eth0_
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
ulimits:
nproc: 65535
memlock:
soft: -1
hard: -1
cap_add:
- ALL
# privileged: true
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
resources:
limits:
cpus: '1'
memory: 256M
reservations:
cpus: '1'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 10s
volumes:
- type: volume
source: logs
target: /var/log
- type: volume
source: esdata3
target: /usr/share/elasticsearch/data
networks:
esnet:
aliases:
- elasticsearch
ports:
- 9200:9200
- 9300:9300
migrate:
image: webapp-python
depends_on:
- elasticsearch
networks:
- esnet
working_dir: /app/migrations
command: [ "python3", "migration_runner.py" ]
flask:
image: webapp-python
depends_on:
- elasticsearch
networks:
- esnet
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
environment:
- FLASK_APP=/app/run.py
- FLASK_DEBUG=True
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
ports:
- 5000:5000
command: [ "flask", "run", "--host=0.0.0.0" ]
volumes:
esdata3:
logs:
networks:
esnet:
driver: bridge