Add postgres to Smarthome
This commit is contained in:
parent
d0a670796c
commit
dc1303c796
1 changed files with 20 additions and 0 deletions
|
@ -46,6 +46,26 @@ services:
|
|||
labels:
|
||||
- "docker.group=smartHome"
|
||||
|
||||
db:
|
||||
image: postgres:${POSTGRES_VERSION}
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- smarthome
|
||||
volumes:
|
||||
- ${VOLUMES_PATH}/smartHome/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
||||
start_period: 20s
|
||||
interval: 30s
|
||||
retries: 5
|
||||
timeout: 5s
|
||||
labels:
|
||||
- "docker.group=smartHome"
|
||||
|
||||
|
||||
networks:
|
||||
web:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue