-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·46 lines (42 loc) · 993 Bytes
/
docker-compose.yml
File metadata and controls
executable file
·46 lines (42 loc) · 993 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
40
41
42
43
44
45
46
version: '3'
services:
postgres:
image: postgres:15-alpine
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: task_tracker
volumes:
- task_tracker_postgres_data:/var/lib/postgresql/data
- ./initdb:/docker-entrypoint-initdb.d
networks:
- task_tracker_network
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 3
app:
build: .
image: task_tracker
container_name: app
ports:
- "8000:8000"
environment:
HOST: postgres
PORT: 5432
PG_DBNAME: task_tracker
PG_USER: task_tracker_user
PG_PASSWORD: 123
networks:
- task_tracker_network
depends_on:
postgres:
condition: service_healthy
volumes:
task_tracker_postgres_data:
name: task_tracker_postgres_data
networks:
task_tracker_network:
name: task_tracker_network