Add healthchecks (#48)

This commit is contained in:
peterrus 2022-03-17 15:17:02 +01:00 committed by GitHub
parent 78e6ac4142
commit abe0dc3cb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@ services:
image: postgres:12.1-alpine image: postgres:12.1-alpine
container_name: pleroma_db container_name: pleroma_db
restart: always restart: always
healthcheck:
test: ["CMD", "pg_isready", "-U", "pleroma"]
environment: environment:
POSTGRES_USER: pleroma POSTGRES_USER: pleroma
POSTGRES_PASSWORD: ChangeMe! POSTGRES_PASSWORD: ChangeMe!
@ -16,6 +18,12 @@ services:
build: . build: .
image: pleroma image: pleroma
container_name: pleroma_web container_name: pleroma_web
healthcheck:
test:
[
"CMD-SHELL",
"wget -q --spider --proxy=off localhost:4000 || exit 1",
]
restart: always restart: always
ports: ports:
- '4000:4000' - '4000:4000'
@ -32,4 +40,4 @@ services:
DB_PASS: ChangeMe! DB_PASS: ChangeMe!
DB_NAME: pleroma DB_NAME: pleroma
depends_on: depends_on:
- db - db