-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (38 loc) · 885 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
version: '3.4'
services:
app: &app
build:
context: .
dockerfile: ./Dockerfile
image: table-structure-sample:0.1.0
tmpfs:
- /tmp
rails:
<<: *app
container_name: table-structure-rails
volumes:
- ./rails:/app:cached
- ./table_structures:/app/app/table_structures:cached
- rails_cache:/app/tmp/cache
- rails_node_modules:/app/node_modules
- bundle:/usr/local/bundle
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -b '0.0.0.0'"
ports:
- '3000:3000'
depends_on:
- db
db:
image: mysql:8
container_name: table-structure-db
volumes:
- mysql:/var/lib/mysql
- ./mysql/conf.d:/etc/mysql/conf.d
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: my-secret-pw
volumes:
mysql:
bundle:
rails_cache:
rails_node_modules: