forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
165 lines (155 loc) · 5.17 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version: "3"
services:
rails:
image: quay.io/forem/forem:development
container_name: forem_rails
user: root
ports:
- "3000:3000"
depends_on:
- bundle
- db
- elasticsearch
- redis
- yarn
environment:
RAILS_ENV: development
DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
ELASTICSEARCH_URL: http://elasticsearch:9200
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SIDEKIQ_URL: redis://redis:6379
REDIS_URL: redis://redis:6379
RACK_TIMEOUT_WAIT_TIMEOUT: 10000
RACK_TIMEOUT_SERVICE_TIMEOUT: 10000
STATEMENT_TIMEOUT: 10000
APP_DOMAIN: rails
volumes:
- .:/opt/apps/forem:delegated
entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "http://elasticsearch:9200", "-wait", "tcp://redis:6379", "-wait", "file:///opt/apps/forem/bundle_finished", "-timeout", "2700s"]
command: [ "bash", "-c", "./scripts/entrypoint.sh bootstrap && bundle exec rails server -b 0.0.0.0 -p 3000"]
bundle:
image: quay.io/forem/forem:development
container_name: forem_bundle
user: root
environment:
RAILS_ENV: development
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SIDEKIQ_URL: redis://redis:6379
REDIS_URL: redis://redis:6379
DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
ELASTICSEARCH_URL: http://elasticsearch:9200
volumes:
- .:/opt/apps/forem:delegated
command: ["./scripts/bundle.sh"]
yarn:
image: quay.io/forem/forem:development
container_name: forem_yarn
user: root
environment:
RAILS_ENV: development
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SIDEKIQ_URL: redis://redis:6379
REDIS_URL: redis://redis:6379
DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
ELASTICSEARCH_URL: http://elasticsearch:9200
volumes:
- .:/opt/apps/forem:delegated
command: ["yarn install --dev"]
webpacker:
image: quay.io/forem/forem:development
container_name: forem_webpacker
user: root
depends_on:
- bundle
- rails
- yarn
environment:
RAILS_ENV: development
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SIDEKIQ_URL: redis://redis:6379
REDIS_URL: redis://redis:6379
DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
ELASTICSEARCH_URL: http://elasticsearch:9200
volumes:
- .:/opt/apps/forem:delegated
entrypoint: ["dockerize", "-wait", "file:///opt/apps/forem/node_modules/.bin/webpack-dev-server", "-wait", "file:///opt/apps/forem/bundle_finished", "-timeout", "2700s"]
command: ["./bin/webpack-dev-server"]
seed:
image: quay.io/forem/forem:development
container_name: forem_seed
user: root
depends_on:
- rails
- redis
- db
- elasticsearch
environment:
RAILS_ENV: development
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SIDEKIQ_URL: redis://redis:6379
REDIS_URL: redis://redis:6379
DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
ELASTICSEARCH_URL: http://elasticsearch:9200
volumes:
- .:/opt/apps/forem:delegated
entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "http://elasticsearch:9200", "-wait", "tcp://redis:6379", "-wait", "http://rails:3000", "-timeout", "2700s"]
command: ["bundle", "exec", "rake","db:seed"]
sidekiq:
image: quay.io/forem/forem:development
container_name: forem_sidekiq
user: root
depends_on:
- rails
- redis
- db
- elasticsearch
environment:
RAILS_ENV: development
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SIDEKIQ_URL: redis://redis:6379
REDIS_URL: redis://redis:6379
DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development
ELASTICSEARCH_URL: http://elasticsearch:9200
volumes:
- .:/opt/apps/forem:delegated
entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "http://elasticsearch:9200", "-wait", "tcp://redis:6379", "-wait", "http://rails:3000", "-timeout", "2700s"]
command: ["bundle", "exec", "sidekiq","-c","2"]
db:
image: postgres:11-alpine
container_name: forem_postgresql
environment:
POSTGRES_USER: forem
POSTGRES_PASSWORD: forem
POSTGRES_DB: PracticalDeveloper_development
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data:delegated
redis:
image: redis:6.0.9-alpine
container_name: forem_redis
ports:
- "6379:6379"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
container_name: forem_elasticsearch
environment:
- cluster.name=forem
- 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
volumes:
- es_data:/usr/share/elasticsearch/data:delegated
ports:
- "9200:9200"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
db_data:
es_data: