-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (43 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
47 lines (43 loc) · 1.15 KB
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
version: '3'
services:
db:
image: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
web:
build: .
command: bundle exec rails server -p 3000 -b '0.0.0.0'
environment:
RAILS_ENV: development
DATABASE_URL: postgres://postgres@db:5432/licensor_development
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
ports:
- "3000:3000"
depends_on:
- db
test:
build: .
command: bash -c "bundle exec rails db:test:prepare && bundle exec rails test"
environment:
RAILS_ENV: test
DATABASE_URL: postgres://postgres@db:5432/licensor_test
SECRET_KEY_BASE: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
# Mock AWS credentials for tests
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: testing
AWS_SECRET_ACCESS_KEY: testing
AWS_BUCKET: test-bucket
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
depends_on:
- db
volumes:
postgres_data:
bundle_cache: