-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (73 loc) · 1.54 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: '3'
networks:
development:
test:
volumes:
db_data:
gem_cache:
shared_data:
services:
workostest_redis:
image: redis:6.2.2
command: redis-server
networks:
- development
- test
volumes:
- shared_data:/var/shared/redis
workostest_db:
image: postgres:13.2
container_name: workostest_db
volumes:
- db_data:/var/lib/postgresql/data
- shared_data:/var/shared
networks:
- development
- test
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
workostest_app:
build:
context: .
dockerfile: Dockerfile.dev
container_name: workostest_app
volumes:
- .:/var/app
- shared_data:/var/shared
- gem_cache:/usr/local/bundle/gems
networks:
- development
ports:
- 3000:3000
stdin_open: true
tty: true
env_file: .env.development
entrypoint: dev-entrypoint.sh
command: ['rails', 'server', '-p', '3000', '-b', '0.0.0.0']
environment:
RAILS_ENV: development
depends_on:
- workostest_db
workostest_test:
image: workos-test_workostest_app
container_name: workostest_test
volumes:
- .:/var/app
- shared_data:/var/shared
- gem_cache:/usr/local/bundle/gems
networks:
- test
ports:
- 3001:3000
stdin_open: true
tty: true
env_file: .env.test
entrypoint: test-entrypoint.sh
command: ["rails", "-v"]
environment:
RAILS_ENV: test
depends_on:
- workostest_db