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 diff --git a/docker-compose.yml b/docker-compose.yml index 1a7e6535..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 @@ -47,6 +51,10 @@ services: networks: - portfolionet 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 @@ -70,8 +78,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqworker default portfolio-rq-worker-2: @@ -91,8 +97,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqworker high default portfolio-rq-worker-3: @@ -112,8 +116,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqworker high video default portfolio-rq-scheduler: @@ -133,8 +135,6 @@ services: - portfolio-postgres - portfolio-redis - portfolio-lool - healthcheck: - test: ["NONE"] command: python manage.py rqscheduler portfolio-clamav: 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 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