-
Notifications
You must be signed in to change notification settings - Fork 114
/
docker-compose.yml
45 lines (42 loc) · 1.15 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
version: '3.8'
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:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USERNAME:-postgres} -d petrescue_development"]
interval: 10s
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
sass:
build: .
command: bash -c "bundle install && bundle exec rails dartsass:watch"
volumes:
- .:/petrescue
depends_on:
app:
condition: service_started
stdin_open: true
tty: true
volumes:
postgres-data: