forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (62 loc) · 1.6 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
version: "3"
services:
web:
build: .
ports:
- "3000:3000"
depends_on:
- db
- redis
- elasticsearch
environment:
RAILS_ENV: development
DATABASE_URL: postgres://postgres:mysecretpassword@db:5432/postgres
YARN_INTEGRITY_ENABLED: "false"
ELASTICSEARCH_URL: http://elasticsearch:9200
REDIS_URL: redis://redis:6379
volumes:
- .:/usr/src/app
command: bundle exec rails server -b 0.0.0.0 -p 3000
webpacker:
build: .
command: ./bin/webpack-dev-server
sidekiq:
build: .
command: bundle exec sidekiq -c 2
depends_on:
- redis
- db
- elasticsearch
environment:
RAILS_ENV: development
REDIS_SIDEKIQ_URL: redis://redis:6379
DATABASE_URL: postgres://postgres:mysecretpassword@db:5432/postgres
ELASTICSEARCH_URL: http://elasticsearch:9200
db:
image: postgres:${POSTGRES_VERSION:-9.6.15-alpine}
ports:
- "5432:5432"
redis:
image: "redis"
ports:
- "6379:6379"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.type=single-node"
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./docker_data/elasticsearch/data:/usr/share/elasticsearch/data
ports:
- "9200:9200"