-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yml
48 lines (48 loc) · 1.16 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
version: '3'
volumes:
mysql-data:
driver: 'local'
services:
db:
image: mysql:5.6
command: '--innodb-file-format=Barracuda --innodb-file-per-table=true --innodb-large-prefix=true --max-allowed-packet=32MB'
environment:
MYSQL_USER: root
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_ROOT_HOST: '%'
TZ: /usr/share/zoneinfo/Asia/Tokyo
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot", "-P", "3306"]
interval: 1m
timeout: 10s
retries: 5
app:
image: gitfab2_dev
build:
context: .
dockerfile: docker/Dockerfile.dev
command: >
/bin/sh -c "rm -f tmp/pids/server.pid && cp config/database.ymls/development.yml config/database.yml && bundle exec rails s"
volumes:
- .:/src
ports:
- 3000:3000
tty: true
stdin_open: true
env_file: .env
environment:
DB_HOST: db
DB_USERNAME: root
DB_PASSWORD:
DB_PORT: 3306
depends_on:
- db
- webpack
webpack:
image: gitfab2_dev
command: >
/bin/sh -c "npm start"
volumes:
- .:/src