feat: add health endpoint and healthcheck to container

This commit is contained in:
Miguel Ribeiro
2025-09-15 19:24:40 +02:00
parent 20d6f8dbee
commit 9cfab973f5
9 changed files with 35 additions and 6 deletions

View File

@@ -43,13 +43,11 @@ RUN dos2unix /etc/cron.d/cronjobs && \
# Expose port 80 for Nginx
EXPOSE 80
ARG SOFTWARE_VERSION=1.20.0
ENTRYPOINT ["dumb-init", "--"]
# Requires docker engine 25+ for the --start-interval flag
HEALTHCHECK --interval=2m --timeout=2s --start-period=20s --start-interval=5s --retries=3 \
CMD ["curl", "-fsS", "127.0.0.1/health.php"]
CMD ["curl", "-fsS", "http://127.0.0.1/health.php"]
# Start both PHP-FPM, Nginx
CMD ["/var/www/html/startup.sh"]

View File

@@ -131,6 +131,16 @@ docker run -d --name wallos -v /path/to/config/wallos/db:/var/www/html/db \
bellamy/wallos:latest
```
Disable healthcheck (optional, e.g., for Docker <25 or faster startup reporting):
```bash
docker run -d --name wallos -v /path/to/config/wallos/db:/var/www/html/db \
-v /path/to/config/wallos/logos:/var/www/html/images/uploads/logos \
-e TZ=Europe/Berlin -p 8282:80 --restart unless-stopped \
--health-cmd=NONE \
bellamy/wallos:latest
```
### Docker Compose
```
@@ -149,6 +159,25 @@ services:
restart: unless-stopped
```
Disable healthcheck (optional, e.g., for Docker <25 or faster startup reporting):
```
services:
wallos:
container_name: wallos
image: bellamy/wallos:latest
ports:
- "8282:80/tcp"
environment:
TZ: 'America/Toronto'
volumes:
- './db:/var/www/html/db'
- './logos:/var/www/html/images/uploads/logos'
restart: unless-stopped
healthcheck:
test: ["NONE"]
```
## Usage
Just open the browser and open `ip:port` of the machine running wallos.
@@ -159,9 +188,9 @@ If you want to trigger an Update of the exchange rates, change your main currenc
## Screenshots
![Screenshot](screenshots/wallos-dashboard-light.png)
![Screenshot](screenshots/wallos-subscriptions-light.png)
![Screenshot](screenshots/wallos-dashboard-dark.png)
![Screenshot](screenshots/wallos-subscriptions-dark.png)
![Screenshot](screenshots/wallos-stats.png)
@@ -169,6 +198,8 @@ If you want to trigger an Update of the exchange rates, change your main currenc
![Screenshot](screenshots/wallos-form.png)
![Screenshot](screenshots/wallos-subscriptions-mobile-light.png) ![Screenshot](screenshots/wallos-subscriptions-mobile-dark.png)
![Screenshot](screenshots/wallos-dashboard-mobile-light.png) ![Screenshot](screenshots/wallos-dashboard-mobile-dark.png)
## OIDC

View File

@@ -1,3 +1,3 @@
<?php
$version = "v4.2.0";
$version = "v4.3.0";
?>

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 212 KiB

View File

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB