-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (49 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
49
50
51
52
53
version: '2'
services:
datastore:
container_name: myrails-development-datastore-${BUILD_TAG}
image: busybox
volumes:
- mysql:/var/lib/mysql
- bundle_install:/usr/local/bundle
database:
container_name: myrails-development-database-${BUILD_TAG}
image: mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes_from:
- datastore
ports:
- 3306:3306
rails: &rails
container_name: myrails-development-rails-${BUILD_TAG}
image: myrails-development:${BUILD_TAG}
build:
context: .
dockerfile: Dockerfile.development
environment: &rails_environment
RAILS_ENV: development
DATABASE_URL: mysql2://root@database:3306/sample_database
depends_on:
- database
volumes_from:
- datastore
volumes:
- .:/usr/src/app
ports:
- 3000:3000
tty: true
stdin_open: true
spring:
<<: *rails
container_name: myrails-development-spring-${BUILD_TAG}
command: spring server
environment:
<<: *rails_environment
SPRING_SOCKET: /tmp/spring.sock
ports: []
volumes:
mysql:
driver: local
bundle_install:
driver: local