-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (33 loc) · 814 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (33 loc) · 814 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
version: '2.1'
services:
playlist-service:
image: playlist-app
container_name: playlist-app
build:
context: .
dockerfile: Dockerfile
ports:
- 8000:8000
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=postgres://playlist:password@db:5432/playlist_db
db:
image: postgres
container_name: playlist-postgres
restart: always
environment:
- POSTGRES_USER=playlist
- POSTGRES_PASSWORD=password
- POSTGRES_DB=playlist_db
volumes:
- ./pginit:/docker-entrypoint-initdb.d
- ./pginit:/docker-entrypoint.d/create-db.sh
ports:
- 5432:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U playlist -d playlist_db" ]
interval: 5s
timeout: 5s
retries: 5