From e1121e9396c61e1ed9834b1a0ad3df05a976d411 Mon Sep 17 00:00:00 2001 From: Philipp Mayer Date: Wed, 13 Dec 2023 09:10:11 +0100 Subject: [PATCH 1/4] change: move healtcheck to docker-compose.yml --- docker-compose.yml | 10 ++-------- src/Dockerfile | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1a7e6535..9a9b61a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,6 +47,8 @@ services: networks: - portfolionet restart: always + healthcheck: + test: ["CMD-SHELL", "curl --fail http://localhost:8200/health || exit 1"] depends_on: - portfolio-postgres - portfolio-redis @@ -70,8 +72,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqworker default portfolio-rq-worker-2: @@ -91,8 +91,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqworker high default portfolio-rq-worker-3: @@ -112,8 +110,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqworker high video default portfolio-rq-scheduler: @@ -133,8 +129,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqscheduler portfolio-clamav: diff --git a/src/Dockerfile b/src/Dockerfile index 2a0bdd40..65fa1493 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -47,9 +47,6 @@ RUN pip install -r requirements.txt EXPOSE 8200 -HEALTHCHECK CMD curl --fail http://localhost:8200/health || exit 1 - - FROM base as dev # to ensure pip-sync is also working in docker dev setup we need to overwrite requirements.txt From 8b2bee9473eb6d36ea32c60071263b6c5489e44e Mon Sep 17 00:00:00 2001 From: Philipp Mayer Date: Wed, 13 Dec 2023 09:11:28 +0100 Subject: [PATCH 2/4] feat: set start_period and interval for healthchecks --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9a9b61a5..10b7184c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,8 @@ services: restart: always healthcheck: test: ["CMD", "redis-cli", "--raw", "incr", "ping"] + start_period: 60s + interval: 60s command: redis-server --appendonly yes portfolio-postgres: @@ -27,6 +29,8 @@ services: restart: always healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + start_period: 60s + interval: 60s portfolio-django: build: ./src @@ -49,6 +53,8 @@ services: restart: always healthcheck: test: ["CMD-SHELL", "curl --fail http://localhost:8200/health || exit 1"] + start_period: 60s + interval: 60s depends_on: - portfolio-postgres - portfolio-redis From 3dfec8ae8ce3a27e25c88aa753f111587d0bae95 Mon Sep 17 00:00:00 2001 From: Philipp Mayer Date: Wed, 13 Dec 2023 09:18:59 +0100 Subject: [PATCH 3/4] docs: update documentation --- docs/source/install.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index 36f89a91..c91bea27 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -171,12 +171,12 @@ LC_NUMERIC="en_US.UTF-8" python manage.py runserver 8200 - Create and change to `/opt/base` -- Clone git repository and checkout branch `master`: +- Clone git repository and checkout branch `main`: ```bash git clone https://github.com/base-angewandte/portfolio-backend.git cd portfolio-backend - git checkout master + git checkout main ``` - Check and adapt settings (see [Configuration](./configuration.md) for further details about the configuration possibilities): @@ -194,7 +194,7 @@ LC_NUMERIC="en_US.UTF-8" python manage.py runserver 8200 - Use `Makefile` to initialize and run project: ```bash - make start init init-static restart-gunicorn + make start init restart-gunicorn ``` - Install nginx and configure it accordingly From 1c21d22cb6a5c9dee322cf148308bf09596dbc67 Mon Sep 17 00:00:00 2001 From: Philipp Mayer Date: Wed, 13 Dec 2023 09:47:39 +0100 Subject: [PATCH 4/4] docs: update CHANGELOG for 1.3.5 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c6c4bd..8b1427db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.3.5 + +## Changed + +- move healtcheck to docker-compose.yml +- set start_period and interval for healthchecks +- update documentation + ## 1.3.4 ### Added