-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
43 lines (42 loc) · 966 Bytes
/
compose.yaml
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
services:
web:
build:
context: ./
dockerfile: development.Dockerfile
command: bash -c "rm -f tmp/pids/server.pid && bin/rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/usr/src/app
- bundle:/usr/local/bundle
ports:
- "3001:3000"
env_file:
- .env
environment:
- HISTFILE=/usr/src/app/log/.bash_history
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db:
image: postgis/postgis:16-3.4
env_file:
- .env
ports:
- "5433:5432"
volumes:
- pg_data:/var/lib/postgresql/data
- ./init_db.sql:/docker-entrypoint-initdb.d/postgis_extensions.sql
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${DB_DEV_NAME}'"]
interval: 2s
timeout: 5s
retries: 30
redis:
image: redis
volumes:
- redis_data:/data
volumes:
pg_data:
redis_data:
bundle: