-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 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
version: '3'
services:
web:
image: braidn/ruby-full-stack:2.3.4
command: bundle exec shotgun --port 3000 --host '0.0.0.0'
container_name: roda_roar_app
ports:
- 3000:3000
volumes:
- .:/src/repo
- bundle_cache:/src/repo/.bundle
tty: true
stdin_open: true
environment:
DATABASE_URL: postgres://postgres@db:5432/roda_roar
depends_on:
- db
test:
image: braidn/ruby-full-stack:2.3.4
command: bundle exec ruby -I . -e "require 'minitest/autorun'; Dir.glob('./test/**/*_test.rb') { |f| require(f) }"
container_name: roda_roar_app_test
ports:
- 3000:3000
volumes:
- .:/src/repo
- bundle_cache:/src/repo/.bundle
tty: true
stdin_open: true
environment:
DATABASE_URL: postgres://postgres@db:5432/roda_roar_test
RACK_ENV: test
depends_on:
- db
db:
image: kiasaki/alpine-postgres:9.5
container_name: roda_roar_db
volumes:
- pg_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
ports:
- 15432:5432
networks:
default:
aliases:
- database
volumes:
bundle_cache:
pg_data: