-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (44 loc) · 1.02 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
services:
app:
build:
context: .
dockerfile: Dockerfile
target: dev
command: ['bin/rails', 'server', '-p', '3000', '-b', '0.0.0.0']
entrypoint: ./dev.entrypoint.sh
environment:
- POSTGRES_HOST=db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- RAILS_ENV=development
ports:
- 3000:3000
stdin_open: true
tty: true
volumes:
- .:/home/darnoc/app
- shared-data:/var/shared
- gem-cache:/usr/local/bundle/gems
depends_on:
db:
condition: service_healthy
db:
image: postgres:16.3-bullseye
volumes:
- db_data:/var/lib/postgresql/data
- shared_data:/var/shared
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
ports:
- 5432:5432
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data: {}
gem-cache: {}
shared-data: {}