-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
126 lines (123 loc) · 2.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
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
# ./docker-compose.yml
version: "3.7"
volumes:
bundle:
driver: local
mysql:
driver: local
tmp:
driver: local
node-modules:
driver: local
x-common-environment: &common-environment
RAILS_ENV: "development"
MYSQL_HOST: "mysql"
MYSQL_USER: "root"
MYSQL_PORT: "3306"
MYSQL_PASSWORD: "root"
BUNDLE_PATH: "/bundle"
BUNDLE_JOBS: "2"
BUNDLE_RETRY: "3"
BASE_URL: "http://localhost"
BASE_URL_PORT: "5555"
SESSION_TIMEOUT_IN_SECONDS: "900"
SESSION_TIMEOUT_WARNING: "true"
RAILS_MAX_THREADS: "1"
REDIS_URL: "redis://redis"
BUNDLER_RAILS_VERSION: "~> 6"
services:
mysql:
image: mysql:latest
command:
- --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_HOST=mysql
ports:
- "3308:3306"
expose:
- "3308"
volumes:
- mysql:/var/lib/mysql
redis:
image: redis
expose:
- 6379
engine:
build:
args:
BUNDLE_WITHOUT: "darwin"
RAILS_ENV: development
target: base
context: .
command: test/dummy/bin/rails s -p 5555 -e development -b '0.0.0.0'
# so things like pry work
tty: true
stdin_open: true
volumes:
- .:/home/app
- bundle:/bundle
- node-modules:/home/app/node_modules
- tmp:/home/app/tmp
- ..:/local
env_file:
- .env
environment:
<<: *common-environment
ports:
- "5555:5555"
links:
- mysql
- redis
engine_with_sidekiq:
build:
args:
BUNDLE_WITHOUT: "darwin"
RAILS_ENV: development
target: base
context: .
command: test/dummy/bin/rails s -p 5555 -e development -b '0.0.0.0'
# so things like pry work
tty: true
stdin_open: true
volumes:
- .:/home/app
- bundle:/bundle
- node-modules:/home/app/node_modules
- tmp:/home/app/tmp
- ..:/local
env_file:
- .env
environment:
<<: *common-environment
USE_SIDEKIQ: "true"
ports:
- "5555:5555"
links:
- mysql
- redis
- sidekiq
sidekiq:
build:
args:
BUNDLE_WITHOUT: "darwin"
RAILS_ENV: development
target: base
context: .
command: test/dummy/bin/sidekiq -e development -q twilio_sms,1 -q default,1 -q mailers,1
# so things like pry work
tty: true
stdin_open: true
volumes:
- .:/home/app
- bundle:/bundle
- node-modules:/home/app/node_modules
- tmp:/home/app/tmp
- ..:/local
env_file:
- .env
environment:
<<: *common-environment
links:
- mysql
- redis