-
Notifications
You must be signed in to change notification settings - Fork 123
/
docker-compose.yml
72 lines (67 loc) · 1.64 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
services:
postgres:
image: postgres:14
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: petrescue_development
POSTGRES_USER: ${DATABASE_USERNAME:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-password}
ports:
- 54320:5432
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DATABASE_USERNAME:-postgres} -d petrescue_development",
]
interval: 10s
cable:
image: postgres:14
environment:
POSTGRES_DB: cable
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 54321:5432
queue:
image: postgres:14
environment:
POSTGRES_DB: queue
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 54322:5432
app:
build:
context: .
dockerfile: dockerfile.dev
command: bash -c "rm -f tmp/pids/server.pid && bundle install && bundle exec rails s -b '0.0.0.0'"
volumes:
- .:/petrescue
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://${DATABASE_USERNAME:-postgres}:${DATABASE_PASSWORD:-password}@postgres:5432/petrescue_development
RAILS_ENV: development
stdin_open: true
tty: true
sass:
build:
context: .
dockerfile: dockerfile.dev
command: bash -c "bundle install && bundle exec rails dartsass:watch"
volumes:
- .:/petrescue
depends_on:
app:
condition: service_started
stdin_open: true
tty: true
environment:
RAILS_ENV: development
volumes:
postgres-data: