-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathdocker-compose.yml
80 lines (75 loc) · 1.99 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
80
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:
- ${DATABASE_PORT:-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: ${DATABASE_USERNAME:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-password}
ports:
- ${CABLE_PORT:-54321}:5432
queue:
image: postgres:14
environment:
POSTGRES_DB: queue
POSTGRES_USER: ${DATABASE_USERNAME:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-password}
ports:
- ${QUEUE_PORT:-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_USERNAME: ${DATABASE_USERNAME:-postgres}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-password}
DEFAULT_HOST: postgres
CABLE_HOST: cable
QUEUE_HOST: queue
RAILS_ENV: development
SERVICE_NAME: app
SOLID_QUEUE_IN_PUMA: true
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
DATABASE_USERNAME: ${DATABASE_USERNAME:-postgres}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-password}
volumes:
postgres-data: