-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·65 lines (61 loc) · 1.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·65 lines (61 loc) · 1.38 KB
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
version: '3.1'
services:
elasticsearch:
image: elasticsearch:7.17.10
container_name: elasticsearch
restart: always
env_file:
- './env/.env.prod.es'
volumes:
- ./search_data:/usr/share/elasticsearch/data
ports:
- "9200"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s"]
interval: 10s
timeout: 10s
retries: 10
start_period: 60s
db:
image: mysql:5.7.27
ulimits:
nofile:
soft: 1048576
hard: 1048576
container_name: databases_mysql
restart: always
ports:
- "3310"
env_file:
- './env/.env.prod.db'
volumes:
- ./mysql:/var/lib/mysql
- ./mysql-files:/var/lib/mysql-files
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
rails:
build:
context: ./
dockerfile: Dockerfile
tty: true
stdin_open: true
container_name: databases_app
depends_on:
db:
condition: service_healthy
elasticsearch:
condition: service_healthy
restart: always
env_file:
- './env/.env.prod.rails'
volumes:
- ./:/home/databases
ports:
- "3000:3000"
links:
- db
- elasticsearch