mirror of
https://git.joinfirefish.org/firefish/firefish.git
synced 2024-05-18 05:01:11 +02:00
container: enable docker healthchecks
ref: !10681 Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
parent
75f277f461
commit
8a5a6dcc45
|
@ -48,7 +48,7 @@ FROM docker.io/node:20-slim
|
|||
WORKDIR /firefish
|
||||
|
||||
# Install runtime dependencies
|
||||
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends zip unzip tini ffmpeg ca-certificates
|
||||
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends zip unzip tini ffmpeg ca-certificates curl
|
||||
|
||||
RUN echo 'deb https://deb.debian.org/debian experimental main' | tee /etc/apt/sources.list
|
||||
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get --target-release experimental install -y --no-install-recommends libc6
|
||||
|
|
|
@ -6,8 +6,10 @@ services:
|
|||
container_name: firefish_web
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
|
@ -19,6 +21,11 @@ services:
|
|||
- ./custom:/firefish/custom:ro
|
||||
- ./files:/firefish/files
|
||||
- ./.config:/firefish/.config:ro
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:3000 || exit 1
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
restart: unless-stopped
|
||||
|
@ -28,6 +35,11 @@ services:
|
|||
- calcnet
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
healthcheck:
|
||||
test: redis-cli ping
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
db:
|
||||
restart: unless-stopped
|
||||
|
@ -39,6 +51,11 @@ services:
|
|||
- .config/docker.env
|
||||
volumes:
|
||||
- ./db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: pg_isready --user="$${POSTGRES_USER}" --dbname="$${POSTGRES_DB}"
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
calcnet:
|
||||
|
|
Loading…
Reference in a new issue