From 00ceb9bd4631999905cc61da9f3d2230cce884c5 Mon Sep 17 00:00:00 2001 From: jo Date: Fri, 3 Mar 2023 17:40:08 +0100 Subject: [PATCH] fix: move docker specific setup to dockerfile --- Dockerfile | 4 ++++ docker-compose.yml | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab3f7b6dd..1a05a13ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -174,6 +174,9 @@ CMD ["/usr/local/bin/gunicorn", \ ARG LIBRETIME_VERSION ENV LIBRETIME_VERSION=$LIBRETIME_VERSION +HEALTHCHECK CMD ["python3", "-c", \ + "import requests; requests.get('http://localhost:9001/api/v2/version').raise_for_status()"] + #======================================================================================# # Worker # #======================================================================================# @@ -213,6 +216,7 @@ ENV LIBRETIME_VERSION=$LIBRETIME_VERSION FROM php:7.4-fpm as libretime-legacy ENV LIBRETIME_CONFIG_FILEPATH=/etc/libretime/config.yml +ENV LIBRETIME_LOG_FILEPATH=php://stderr # Custom user ARG USER=libretime diff --git a/docker-compose.yml b/docker-compose.yml index 0cf12b696..45a2e40b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,8 +71,6 @@ services: volumes: - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro - libretime_storage:/srv/libretime - healthcheck: - test: python3 -c "import requests; requests.get('http://localhost:9001/api/v2/version').raise_for_status()" legacy: image: ghcr.io/libretime/libretime-legacy:${LIBRETIME_VERSION:-latest} @@ -83,8 +81,6 @@ services: - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro - libretime_assets:/var/www/html - libretime_storage:/srv/libretime - environment: - LIBRETIME_LOG_FILEPATH: php://stderr nginx: image: nginx