-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (43 loc) · 1.13 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
version: '3'
services:
migrations: &app_base
build:
context: .
dockerfile: dev.Dockerfile
image: agilealliancebrazil/identity:development
links:
- sql_db:db.local
volumes:
- .:/app
command: bundle exec rake db:create db:migrate
environment: &dev_environment
DATABASE_URL: postgres://postgres:[email protected]:5432/identity_development
RACK_ENV: development
RAILS_ENV: development
test:
<<: *app_base
command: bundle exec guard start --no-bundler-warning --no-interactions --force-polling
environment: &test_environment
DATABASE_URL: postgres://postgres:[email protected]:5432/identity_test
RACK_ENV: test
RAILS_ENV: test
test_migrations:
<<: *app_base
command: bundle exec rake db:create db:migrate
environment:
<<: *test_environment
web:
<<: *app_base
command: bundle exec rails server -p 3000 -b 0.0.0.0
links:
- sql_db:db.local
ports:
- '3000'
environment:
<<: *dev_environment
sql_db:
image: postgres:9.6.2-alpine
ports:
- '5432'
environment:
POSTGRES_PASSWORD: s3kr3t