-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (34 loc) · 786 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (34 loc) · 786 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
version: '3.7'
services:
employees-db:
container_name: employees-db
image: postgres:15.6-alpine
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/db_root_password
POSTGRES_DB: employees
PGDATA: /var/lib/postgresql/data/db-files/
secrets:
- db_root_password
networks:
- employees-network
volumes:
- type: volume
source: employees-db-volume
target: /var/lib/postgresql/data
ports:
- "5432:5432"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
volumes:
employees-db-volume:
name: employees-db
secrets:
db_root_password:
file: db_root_password.txt
networks:
employees-network:
name: employees-network