-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
97 lines (94 loc) · 2.12 KB
/
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
95
96
97
services:
mysql:
container_name: xatu-mysql
image: "mysql:8.0.32"
ports:
- 3306:3306
networks:
- xatu_network
environment:
MYSQL_DATABASE: xatu
MYSQL_ROOT_PASSWORD: root
MYSQL_TCP_PORT: 3306
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 2s
timeout: 60s
retries: 30
profiles:
- all
- daemon
redis:
container_name: xatu-redis
image: "redis:5.0.7-alpine"
ports:
- 6379:6379
networks:
- xatu_network
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 2s
timeout: 60s
retries: 30
profiles:
- all
- daemon
command: >
--requirepass ${REDIS_PASSWORD}
elasticsearch:
container_name: xatu-elasticsearch
image: "docker.elastic.co/elasticsearch/elasticsearch:7.17.9"
ports:
- 9200:9200
networks:
- xatu_network
environment:
discovery.type: single-node
discovery.seed_hosts: elasticsearch
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9200" ]
interval: 2s
timeout: 60s
retries: 30
profiles:
- all
- daemon
xatu:
container_name: xatu
build:
context: .
dockerfile: Dockerfile
networks:
- xatu_network
environment:
HOST: 0.0.0.0
MYSQL_HOST: mysql
MYSQL_PORT: 3306
REDIS_HOST: redis
ELASTICSEARCH_HOST: "http://elasticsearch"
ROOT_LOG_LEVEL: ${ROOT_LOG_LEVEL}
LOG_LEVEL: ${LOG_LEVEL}
PORT: ${PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
ports:
- "${PORT}:${PORT}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8089/" ]
interval: 10s
timeout: 110s
retries: 11
depends_on:
elasticsearch:
condition: service_healthy
mysql:
condition: service_healthy
redis:
condition: service_healthy
profiles:
- all
networks:
xatu_network:
driver: bridge