-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 906 Bytes
/
docker-compose.yml
File metadata and controls
45 lines (42 loc) · 906 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
services:
postgres:
image: postgres:15-alpine
container_name: ptmk_postgres
environment:
POSTGRES_DB: ptmk_db
POSTGRES_USER: ptmk_user
POSTGRES_PASSWORD: ptmk_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ptmk_user -d ptmk_db"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
container_name: ptmk_app
depends_on:
postgres:
condition: service_healthy
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ptmk_db
DB_USER: ptmk_user
DB_PASSWORD: ptmk_password
volumes:
- .:/workspace
working_dir: /workspace
stdin_open: true
tty: true
volumes:
postgres_data:
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16