-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
47 lines (45 loc) · 1.04 KB
/
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
44
45
46
47
services:
app:
build:
context: .
target: dev
image: todo-app:development
volumes:
- .:/app
ports:
- 8000:8000
# env_file:
# - .env
environment:
DB_USER: ${POSTGRES_USER}
DEV_DATABASE: ${POSTGRES_DATABASE}
DB_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DATABASE: ${POSTGRES_DATABASE}
DB_PORT: 5432
depends_on:
- db
db:
image: postgres:15
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DATABASE: ${POSTGRES_DATABASE}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- pg-dev-data:/var/lib/postgresql/data
# env_file:
# - .env
# environment:
# POSTGRES_USER: $DB_USER
# POSTGRES_DB: $DEV_DATABASE
# POSTGRES_PASSWORD: $DB_PASSWORD
volumes:
pg-dev-data: