-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 889 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (34 loc) · 889 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
services:
music-collection-web:
build: .
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://musicuser:musicpass@music-collection-db:5432/musiclibrary
- LASTFM_API_KEY=${LASTFM_API_KEY}
volumes:
- ./app:/app/app
- uploads_data:/app/app/static/uploads
depends_on:
music-collection-db:
condition: service_healthy
restart: unless-stopped
music-collection-db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=musicuser
- POSTGRES_PASSWORD=musicpass
- POSTGRES_DB=musiclibrary
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U musicuser -d musiclibrary"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
uploads_data: