-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathdocker-compose.yml
executable file
·78 lines (76 loc) · 1.99 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
68
69
70
71
72
73
74
75
76
77
78
version: '2'
services:
dev:
container_name: mconf_web_dev
build: .
tty: true
ports:
- "3000:3000"
depends_on:
- dev_db
- dev_redis
environment:
- MCONF_REDIS_HOST=dev_redis
- MCONF_REDIS_PASSWORD=BCsy8zMwZay669ii
- MCONF_DATABASE_DEV_HOST=dev_db
- MCONF_DATABASE_DEV_NAME=mconf_web_dev
- MCONF_DATABASE_DEV_USERNAME=mconfweb
- MCONF_DATABASE_DEV_PASSWORD=mconfweb
- RAILS_ENV=development
volumes:
- ./:/usr/src/app
command: bash -c "rake db:create db:migrate && rails s -p3000"
dev_db:
container_name: mconf_web_dev_db
image: mysql:5.6
expose:
- "3306"
volumes:
- ~/.docker-volumes/mconf-web/dev/mysql/:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=mconfweb
- MYSQL_DATABASE=mconf_web_dev
- MYSQL_USER=mconfweb
- MYSQL_PASSWORD=mconfweb
dev_redis:
container_name: mconf_web_dev_redis
image: redis:3.2
expose:
- "6379"
command: redis-server --requirepass "BCsy8zMwZay669ii"
test:
container_name: mconf_web_test
build: .
tty: true
depends_on:
- test_db
- test_redis
environment:
- MCONF_REDIS_HOST=test_redis
- MCONF_REDIS_PASSWORD=BHAy8zMwZay669ii
- MCONF_DATABASE_TEST_HOST=test_db
- MCONF_DATABASE_TEST_NAME=mconf_web_test
- MCONF_DATABASE_TEST_USERNAME=mconfweb
- MCONF_DATABASE_TEST_PASSWORD=mconfweb
- RAILS_ENV=test
volumes:
- ./:/usr/src/app
command: bash -c "rake"
test_db:
container_name: mconf_web_test_db
image: mysql:5.6
expose:
- "3306"
volumes:
- ~/.docker-volumes/mconf-web/test/mysql/:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=mconfweb
- MYSQL_DATABASE=mconf_web_test
- MYSQL_USER=mconfweb
- MYSQL_PASSWORD=mconfweb
test_redis:
container_name: mconf_web_test_redis
image: redis:3.2
expose:
- "6379"
command: redis-server --requirepass "BHAy8zMwZay669ii"