-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (37 loc) · 880 Bytes
/
docker-compose.yml
File metadata and controls
39 lines (37 loc) · 880 Bytes
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
volumes:
postgres_data:
bundle_cache:
services:
app:
build: .
depends_on:
- db
ports:
- "3000:3000"
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/db_production
- RAILS_ENV=production
- JWT_ACCESS_SECRET
- JWT_REFRESH_SECRET
command: >
sh -c "rm -f tmp/pids/server.pid &&
bundle exec rails db:prepare &&
bundle exec rails server -b 0.0.0.0"
db:
image: postgres:16
restart: unless-stopped
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=db_production
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5