move healthcheck to container compose file

This commit is contained in:
2025-02-07 10:20:56 +02:00
parent 3e5169cba5
commit 6c33922677
2 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ services:
YEETFILE_DB_HOST: db
depends_on:
db:
condition: service_healthy
condition: service_healthy
db:
image: ${YEETFILEDB_IMAGE}:${YEETFILEDB_TAG}
container_name: ${YEETFILEDB_CONTAINER_NAME}
@@ -17,8 +17,5 @@ services:
POSTGRES_DB: ${YEETFILE_DB_NAME:-yeetfile}
expose:
- 5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 3s
networks:
- ${YEETFILE_NETWORk_ID}

View File

@@ -7,4 +7,7 @@ services:
volumes:
- ${DOCKERDIR}/${COMPOSE_PROJECT_NAME}/db:/var/lib/postgresql/data
#ports:
# - "5432:5432"
# - "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 3s