-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
38 lines (36 loc) · 992 Bytes
/
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
services:
postgres:
init: true
image: postgres
container_name: docker-postgres
restart: unless-stopped
ports:
- "5432:5432"
command: postgres -c max_connections=200
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- ~/projects/data/docker-rails7-tailwind-pgsql-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
rails:
build: .
tty: true
stdin_open: true
command: sh -c "./docker-entrypoint/rails.sh"
# command: sh -c "rm -f tmp/pids/server.pid && bin/rails server -p 3000 -b 0.0.0.0"
volumes:
- .:/docker-rails7-tailwind-pgsql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
PGHOST: docker-postgres
ports:
- 3000:3000
depends_on:
postgres:
condition: service_healthy