-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
82 lines (77 loc) · 1.61 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
version: "3.8"
services:
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: rails-chat
volumes:
- db:/var/lib/mysql
redis:
image: redis:latest
ports:
- "6379:6379"
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
container_name: es
environment:
- node.name=es
- cluster.name=es-docker-cluster
- cluster.initial_master_nodes=es
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_data:/usr/share/elasticsearch/data
ports:
- 9200:9200
sidekiq:
build: .
command: bundle exec sidekiq
volumes:
- app_data:/app
depends_on:
- db
- redis
- es
environment:
DB_USER: root
DB_NAME: rails-chat
DB_PASSWORD: password
DB_HOST: db
REDIS_URL: redis://redis:6379
ES_URL: http://es:9200
web:
build: .
ports:
- "3000:3000"
depends_on:
- db
- redis
- es
links:
- db
- redis
- es
volumes:
- app_data:/app
environment:
DB_USER: root
DB_NAME: rails-chat
DB_PASSWORD: password
DB_HOST: db
REDIS_URL: redis://redis:6379
ES_URL: http://es:9200
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b
'0.0.0.0'"
volumes:
db: null
es_data: null
app_data: null