0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-08 14:40:05 +00:00
Commit graph

51 commits

Author SHA1 Message Date
Pēteris Caune
279aed2080
Add --start-period and --start-interval in Dockerfile
... to make the container go into a healthy state sooner.

cc: 
2024-12-22 18:11:16 +02:00
Amin Vakil
81869989fb
Set pipefail true for bash in Dockerfile ()
Set pipefail true for bash in Dockerfile
2024-12-19 15:54:42 +02:00
Pēteris Caune
bc5354b05b
Switch off pip's verbose output 2024-12-18 08:51:29 +02:00
Pēteris Caune
fa2c3732cc
Remove "pip install --upgrade pip"
The base image already comes with an up-to-date pip
2024-12-17 14:46:06 +02:00
Pēteris Caune
28d1ce056e
Increase pip's verbosity to debug slow cryptography builds 2024-12-16 15:13:08 +02:00
Pēteris Caune
67dce23f56
Update Dockerfile to install rust using profile "minimal"
This should speed up the build a little bit.
2024-12-15 19:58:37 +02:00
Pēteris Caune
850cab6fa6
Update Dockerfile to use Python 3.13.1
cc: 
2024-12-13 10:06:51 +02:00
Pēteris Caune
2ff68cb597
Update docker/uwsgi.ini to handle subpath in SITE_ROOT
cc: 
2024-12-04 11:00:53 +02:00
Pēteris Caune
7d6fccb05d
Update package versions 2024-10-25 11:02:43 +03:00
Pēteris Caune
dd0a4c1582
Update Dockerfile to use Python 3.13 2024-10-23 13:22:41 +03:00
Pēteris Caune
9139d6825a
Update Dockerfile to explicitly install libexpat1
libexpat1 used to come preinstalled in python -slim base images,
but starting from 3.12.7 it does not any more.

Fixes: 
2024-10-23 13:19:59 +03:00
Pēteris Caune
7225165f9e
Remove --start-period argument in Dockerfile
I don't think it has any effect if it is lower than --interval
2024-10-23 13:15:48 +03:00
Pēteris Caune
5b689d9f87
Increase the interval of Docker HEALTHCHECK instruction to 60s
cc: 
2024-10-23 10:43:57 +03:00
Pēteris Caune
0bf73bf743
Rewrite the fetchstatus.py script to reduce Docker container CPU use
fetchstatus.py was a Django management command, and is now
a standalone script. This way we avoid doing Django housekeeping
every time it runs (every 10 seconds). It still needs to access
the ALLOWED_HOSTS setting, to make the HTTP request with
a correct Host header.

Fixes: 
2024-10-22 10:53:47 +03:00
Pēteris Caune
d723e14284
Switch to an older version of the base image
Related: 

This is temporary until we find out if libexpat will be
reinstated in the base image or not.
2024-10-21 12:08:15 +03:00
Pēteris Caune
a72f3adc45
Update requirements to require only pure-python psycopg
... and install psycopg-c using instuctions in Dockerfile.

This way, getting a development environment or CI environment ready
is quick and easy, but Docker images still get the C optimizations.
2024-09-03 16:10:53 +03:00
Pēteris Caune
320a7c7733
Fix the Docker healthcheck script to supply correct Host header
Commit 8fed685f12 added a HEALTHCHECK
instruction in the Dockerfile. The healthcheck script calls http://localhost:8000/api/v3/status/, which fails if localhost is not in ALLOWED_HOSTS.

With this change, the healthcheck script is now a Django management
command. It reads Django's ALLOWED_HOSTS setting, grabs the first
element, and uses it in the "Host:" HTTP header when making a HTTP
request.

cc: 
2024-08-21 15:52:19 +03:00
Pēteris Caune
6f11b9c0dd
Remove unneeded bits 2024-08-20 13:27:28 +03:00
Pēteris Caune
79b9aae660
Update Dockerfile to install recent rustc (needed to build cryptography)
* Healthchecks depends on python library "fido2"
* fido2 depends on python library "cryptography"
* building cryptography requires recent (1.65+) rustc
* cryptography has prebuilt binary wheels for most architectures
  but not for arm/v7
* Dockerfile uses bookworm as base, which ships rustc 1.63
* So we now install rust using rustup

This is all terrible.
2024-08-20 13:11:29 +03:00
Pēteris Caune
8fed685f12
Update Dockerfile to report container health in docker ps
This commit adds a HEALTHCHECK instruction in Dockerfile.
The HEALTHCHECK instruction calls /docker/fetchstatus.sh
which in turn makes a HTTP request to
http://localhost:8000/api/v3/status/
This endpoint makes a test database query and returns non-200
response if the query fails. So, in short, if the Healthchecks
container for any reason is unable to query database, `docker ps`
will now show the container as "unhealthy".

cc: 
2024-08-19 10:17:05 +03:00
Pēteris Caune
7734839bcc
Fix Dockerfile to avoid having /wheels/ in the final image
This is experimental, let's see if it works...
2024-04-05 13:59:34 +03:00
Pēteris Caune
198c80305e
Remove unused files from docker image, reducing its size slightly 2024-04-05 13:38:42 +03:00
Pēteris Caune
1026c0a1f2
Update Dockerfile to use Python 3.12 2023-12-15 11:15:42 +02:00
Git'Fellow
8dbbd5b9d6
Switch to apt-get ()
More suitable and less error prone to use in scripts
2023-09-20 10:02:34 +03:00
Pēteris Caune
d4060279f1
Fix arm/v7 build 2023-06-15 13:56:04 +03:00
Pēteris Caune
8d41d284e5
Add libxml2 dependency now required by uwsgi 2023-06-15 09:14:44 +03:00
Pēteris Caune
6dbd665c67
Update Dockerfile to use Debian Bookworm as the base 2023-06-15 09:09:17 +03:00
Pēteris Caune
c324787809
Update Dockerfile to prepare a writable location for data volume 2023-06-13 13:52:59 +03:00
Pēteris Caune
292133526f
Update Dockerfile to install rust via rustup
(The rust version in bullseye repositories is now
too old to build cryptography.)
2023-06-05 15:39:13 +03:00
Pēteris Caune
c17a483be4
Add USE_GZIP_MIDDLEWARE env var which enables GZipMiddleware 2023-05-11 17:31:14 +03:00
Pēteris Caune
bb3f139335
Update the Dockerfile to use Python 3.11 2023-03-07 16:33:34 +02:00
Pēteris Caune
949dfa5446
Try another cryptography/rust/qemu/armv7 workaround 2022-10-18 16:56:16 +03:00
Pēteris Caune
414d5a9424
Fix MySQL 8 support in the Docker image () 2022-10-18 14:06:05 +03:00
Pēteris Caune
5baa8a53de
Update Dockerfile with pycurl dependencies 2022-08-16 12:01:15 +03:00
Pēteris Caune
e8160e4cf3
Add minio in the Dockerfile 2022-03-18 09:56:24 +02:00
Pēteris Caune
383cff6255
Improve Dockerfile
Changes:
- Switch to Python 3.10
- Drop pywheels.org repository. Build cryptography, uwsgi, psycopg2
  etc. from source. This means builds on armhf will be slower, but
  hopefully fewer worries about the piwheels binary package
  not finding a .so file in our base image
- Don't ship the .git folder (facepalm)
2022-03-07 21:33:39 +02:00
Pēteris Caune
fc02b7dd99
Fix uwsgi breakage on armhf
The binary uwsgi package from piwheels.org crashes with:

    uwsgi: error while loading shared libraries: libxml2.so.2:
    cannot open shared object file: No such file or directory

(when run in a docker environment, with python:3.9-slim-buster
base image. It works fine in Raspbian)

The workaround is to build uwsgi from source, hence the "--no-binary"
flag.
2022-03-07 17:59:36 +02:00
Pēteris Caune
833e74474a
Update Dockerfile to include mysqlclient
cc: 
2022-03-07 15:55:25 +02:00
Pēteris Caune
d615cde23e
Update Dockerfile to avoid running "pip wheel" more than once
The problem:
- the first "pip wheel" collects a specific version of requests
- the second "pip wheel" collects the latest version of requests
- later "pip install" tries to install both and fails

The fix is to run "pip wheel" once, and it will then pick a single
version of requests that satisfies all constraints.

Fixes: 
2022-01-05 21:35:09 +02:00
Pēteris Caune
cb78bb02d3
Update Dockerfile to install everything from piwheels on arm/v7 2021-11-10 13:38:05 +02:00
Pēteris Caune
6ce002c064
Add libffi-dev in Dockerfile to fix cffi build 2021-11-10 13:12:00 +02:00
Pēteris Caune
b77c54f665
Update Dockerfile to install apprise
Fixes: 
2021-10-25 21:55:11 +03:00
Pēteris Caune
30a3482d0e
Fix missing uwsgi dependencies in arm/v7 Docker image 2021-10-13 10:43:04 +03:00
Pēteris Caune
1b0f5e92f1
Update Dockerfile to use the piwheels.org repo on armhf
cc: , 
2021-10-12 22:40:11 +03:00
Pēteris Caune
27da637e86
Fix Dockerfile to correctly build cryptography==35.0.0 on 32-bit arm
Fixes: 

Also, split Dockerfile into two stages, so rust
and other build dependencies don't end up in the final image.

Note cryptography has binary wheels for various architectures,
but unfortunately not for 32-bit arm. And, starting from v35.0.0,
cryptography requires rust to build from source.
2021-10-01 09:53:48 +03:00
Jake Howard
cd4cc1f2d9 Pin debian version to Buster
Bullseye isn't currently supported on the Pi 4
2021-10-01 08:47:05 +03:00
Jake Howard
7a5afc26be Install libpq-dev so psycopg2 can build correctly 2021-10-01 08:47:05 +03:00
Jake Howard
25da46f5b6 Use slim version of docker container
This massively reduces the size of the final container
2021-10-01 08:47:05 +03:00
Mathias Chevalier
a101b1de91 [DOCKER] Fix failing build on armhf, due to cryptography lib trying to build rust 2021-03-11 14:08:36 +02:00
Pēteris Caune
f06616a934
Add Python 3.9 to the testing matrix 2021-02-05 09:33:20 +02:00