-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (43 loc) · 976 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
43
44
45
46
47
services:
dashboard:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- .:/app
environment:
- RAILS_ENV=development
- DATABASE_URL=postgres://postgres:dummy@db:5432/
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY_BASE=`rake secret`
command: >
sh -c "bundle exec rake db:setup && bundle exec rails server -b 0.0.0.0"
depends_on:
- db
- redis
test:
build:
context: .
dockerfile: Dockerfile
environment:
- RAILS_ENV=test
- DATABASE_URL=postgres://postgres:dummy@db:5432/
command: >
sh -c "bundle exec rake db:create db:schema:load && bundle exec rspec"
depends_on:
- db
redis:
image: redis
volumes:
- redis-data:/data
db:
image: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: dummy
volumes:
redis-data:
postgres-data: