-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (49 loc) · 970 Bytes
/
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
version: "3.6"
services:
mysql:
image: mysql:5.7.23
command: --default-authentication-plugin=mysql_native_password
restart: always
env_file:
- .env
ports:
- "3306:3306"
volumes:
- mysql-volume:/var/lib/mysql
redis:
image: redis:4.0.9-alpine
command: ["redis-server", "--appendonly", "yes"]
hostname: redis
volumes:
- "redis:/data"
rails:
build:
context: .
command: bash -c "rm -f /app/tmp/pids/server.pid || true && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- ".:/app"
ports:
- "3000:3000"
depends_on:
- mysql
- redis
stdin_open: true
tty: true
env_file:
- ".env"
cable:
build:
context: .
depends_on:
- rails
- redis
command: puma -p 28080 /app/cable/config.ru
ports:
- "28080:28080"
volumes:
- ".:/app"
env_file:
- ".env"
volumes:
redis:
mysql-volume: