-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
36 lines (34 loc) · 979 Bytes
/
docker-compose.yaml
File metadata and controls
36 lines (34 loc) · 979 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
services:
db:
build:
context: ./
dockerfile: Dockerfile
args:
ENABLE_BARMAN: ${ENABLE_BARMAN}
BARMAN_SERVER: ${BARMAN_SERVER}
ID_RSA: ${ID_RSA}
ID_RSA_PUB: ${ID_RSA_PUB}
image: samagra-postgres-15-barman
restart: always
volumes:
- db:/var/lib/postgresql/data
profiles: ["database"]
env_file:
- path: .env
required: true
ports:
- "5432:5432/tcp"
- "2222:22/tcp"
command: -c 'config_file=/etc/postgresql/postgresql.conf' -c 'hba_file=/etc/postgresql/pg_hba.conf'
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: ${POSTGRES_USER:?Postgres user is not set in .env}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Postgres password is not set in .env}
BARMAN_SERVER: ${BARMAN_SERVER:?Barman server is not defined in .env}
volumes:
db:
ssh-vol: