-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 1.31 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
version: '3.8'
services:
web:
build:
context: ./
dockerfile: ./Dockerfile
ports:
- 3000:3000
depends_on:
db:
condition: service_healthy
chrome:
condition: service_started
environment:
DATABASE_HOST: db
SELENIUM_DRIVER_URL: http://chrome:4444/wd/hub
env_file: .env
stdin_open: true
tty: true
volumes:
- ./:/app
- web-bundle:/usr/local/bundle
- node-modules:/app/node_modules
command: >
bash -c "
rm -f /app/tmp/pids/server.pid
yarn build --watch < /dev/zero &
yarn build:css --watch < /dev/zero &
rails s -b 0.0.0.0 -p 3000
"
db:
image: mysql/mysql-server:8.0
ports:
- 3306:3306
healthcheck:
test: ['CMD', 'mysqladmin', 'ping']
interval: 5s
timeout: 5s
retries: 5
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
TZ: 'Asia/Tokyo'
stdin_open: true
tty: true
volumes:
- mysql-data:/var/lib/mysql
chrome:
image: seleniarm/standalone-chromium
ports:
- 4444:4444
shm_size: 2gb
stdin_open: true
tty: true
volumes:
web-bundle:
mysql-data:
node-modules:
driver: local
driver_opts:
type: none
device: ${PWD}/node_modules
o: bind