-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (52 loc) · 1.06 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
version: '2'
services:
db:
build: ./db
environment:
- MYSQL_ROOT_PASSWORD=pass
- MYSQL_DATABASE=myapp
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
ports:
- 3309:3306
volumes:
- sql-data:/var/lib/mysql
app: &app_base
build:
context: ./rails
args:
PORT: 3000
command: /bin/sh -c "rm -f /app/tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
env_file: ./rails/.env
volumes:
- ./rails:/app
ports:
- 3000:3000
links:
- db
tty: true
stdin_open: true
spring:
<<: *app_base
command: ["bundle", "exec", "spring", "server"]
ports: []
tty: false
stdin_open: false
pid: host
environment:
SPRING_SOCKET: /tmp/spring/spring.sock
volumes:
- ./rails:/app
- spring:/tmp/spring/
webpack:
<<: *app_base
command: /bin/sh -c "npm install && ./node_modules/.bin/webpack -w"
ports: []
tty: false
stdin_open: false
pid: host
volumes:
- ./mfds:/app
volumes:
sql-data:
spring: