-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
171 lines (160 loc) · 4.42 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
165
166
167
168
169
170
version: '3'
volumes:
your_platform_mysql_data: {}
your_platform_redis_data: {}
your_platform_neo4j_data: {}
your_platform_uploads: {}
your_platform_gems: {}
your_platform_tmp: {}
networks:
backend:
driver: bridge
services:
web:
build: docker/services/your_platform_web_development
volumes:
- ".:/app"
- "your_platform_uploads:/app/uploads"
- "your_platform_gems:/usr/local/bundle"
- "your_platform_tmp:/app/demo_app/my_platform/tmp"
expose:
- 3001
ports:
- "0.0.0.0:3001:3001"
environment:
RAILS_ENV: development
MYSQL_DATABASE: your_platform
MYSQL_TEST_DATABASE: your_platform_test
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_HOST: mysql
REDIS_HOST: redis
NEO4J_REST_URL: "http://neo4j:trinity@neo4j:7474/"
depends_on:
- mysql
- redis
- neo4j
networks:
- default
- backend
command:
- script/start
sidekiq:
build: docker/services/your_platform_web_development
volumes:
- ".:/app"
- "your_platform_uploads:/app/uploads"
- "your_platform_gems:/usr/local/bundle"
- "your_platform_tmp:/app/demo_app/my_platform/tmp"
environment:
RAILS_ENV: development
MYSQL_DATABASE: your_platform
MYSQL_TEST_DATABASE: your_platform_test
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_HOST: mysql
REDIS_HOST: redis
NEO4J_REST_URL: "http://neo4j:trinity@neo4j:7474/"
depends_on:
- mysql
- redis
- neo4j
networks:
- backend
command: /bin/bash -c "cd /app/demo_app/my_platform && bundle exec sidekiq --queue critical --queue default --queue low --queue cache --queue dag_links --verbose --environment development"
notifications:
build: docker/services/your_platform_web_development
volumes:
- ".:/app"
- "your_platform_uploads:/app/uploads"
- "your_platform_gems:/usr/local/bundle"
- "your_platform_tmp:/app/demo_app/my_platform/tmp"
environment:
RAILS_ENV: development
MYSQL_DATABASE: your_platform
MYSQL_TEST_DATABASE: your_platform_test
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_HOST: mysql
REDIS_HOST: redis
NEO4J_REST_URL: "http://neo4j:trinity@neo4j:7474/"
depends_on:
- mysql
- redis
- neo4j
networks:
- backend
command: /bin/bash -c "cd /app/demo_app/my_platform && bundle exec rake your_platform:notifications:worker"
console:
build: docker/services/your_platform_web_development
volumes:
- ".:/app"
- "your_platform_uploads:/app/uploads"
- "your_platform_gems:/usr/local/bundle"
- "your_platform_tmp:/app/demo_app/my_platform/tmp"
environment:
RAILS_ENV: development
MYSQL_DATABASE: your_platform
MYSQL_TEST_DATABASE: your_platform_test
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_HOST: mysql
REDIS_HOST: redis
NEO4J_REST_URL: "http://neo4j:trinity@neo4j:7474/"
depends_on:
- mysql
- redis
- neo4j
networks:
- backend
command: /bin/bash -c "cd /app/demo_app/my_platform && bundle exec rails console"
tests:
build: docker/services/your_platform_web_development
volumes:
- ".:/app"
- "your_platform_gems:/usr/local/bundle"
- "your_platform_tmp:/app/demo_app/my_platform/tmp"
environment:
RAILS_ENV: test
MYSQL_TEST_DATABASE: your_platform_test
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_HOST: mysql
REDIS_HOST: redis
NEO4J_REST_URL_TEST: "http://neo4j:trinity@neo4j:7474/"
depends_on:
- mysql
- redis
- neo4j
networks:
- backend
command: /bin/bash -c "rake tests"
mysql:
image: mysql:5.7
volumes:
- your_platform_mysql_data:/var/lib/mysql
environment:
MYSQL_DATABASE: your_platform
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: your_platform
networks:
- backend
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci"
redis:
image: redis
volumes:
- your_platform_redis_data:/var/lib/redis
networks:
- backend
neo4j:
image: neo4j:3.5
volumes:
- your_platform_neo4j_data:/data
ports:
- "0.0.0.0:7474:7474"
- "0.0.0.0:7687:7687"
environment:
NEO4J_AUTH: "neo4j/trinity"
networks:
- backend