-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
66 lines (59 loc) · 1.26 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
version: '3.8'
services:
db:
container_name: recipes_db
image: mysql:8.0.22
command: --default-authentication-plugin=mysql_native_password
restart: always
platform: linux/x86_64
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
ports:
- 3306:3306
volumes:
- db-data:/var/lib/mysql
redis:
image: redis:latest
command: redis-server --bind redis --port 6379
web:
container_name: recipes_web
build: .
command: /bin/sh -c "rm -f ./tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment:
RECIPES_DATABASE_HOST: db
REDIS_URL: redis://redis:6379/0
ports:
- 3000:3000
volumes:
- .:/web
- /web/vendor
- /web/node_modules
links:
- db
- mailcatcher
stdin_open: true
tty: true
depends_on:
- db
sidekiq:
container_name: recipes_sidekiq
build: .
command: bundle exec sidekiq
environment:
REDIS_URL: redis://redis:6379/0
volumes:
- .:/web
- /web/node_modules
links:
- redis
- db
- mailcatcher
mailcatcher:
image: schickling/mailcatcher
container_name: mailcatcher
ports:
- '1080:1080'
- '1025:1025'
volumes:
db-data:
driver: local