-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (39 loc) · 819 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (39 loc) · 819 Bytes
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
version: '3.4'
volumes:
gems-data:
driver: local
postgres-data:
driver: local
services:
base: &base
build:
context: ./
dockerfile: Dockerfile
image: ubs:latest
env_file: .env
stdin_open: true
tty: true
volumes:
- .:/usr/src/app
- gems-data:/usr/src/app/.gems
depends_on:
- db
app:
<<: *base
command: rails server -b 0.0.0.0
ports:
- '3000:3000'
specs:
<<: *base
container_name: ubs.specs
command: /bin/sh -c "rails db:test:prepare && bundle exec rspec spec"
env_file: .env.test
db:
hostname: db
container_name: ubs.db
image: postgres:10.3-alpine
volumes:
- postgres-data:/var/lib/postgresql/data/
environment:
POSTGRESQL_USER: postgres
POSTGRESQL_PASSWORD: heroku