From d68afb7d0306d2442ec28e9357966a1f498bf1c7 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 21 May 2026 11:21:20 +0800 Subject: [PATCH] Add docker health checks, CSV import docs --- docker-compose.yml | 21 ++++++++++++++++++++- docs/05-FEATURES.md | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b63c3494..574472d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,12 @@ services: networks: - tckdev_net restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "pgrep -f php-fpm > /dev/null 2>&1 || exit 1"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 30s environment: - TZ=Asia/Kuala_Lumpur - RUN_MIGRATIONS=true @@ -58,9 +64,16 @@ services: - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf - /etc/localtime:/etc/localtime:ro depends_on: - - app + app: + condition: service_healthy networks: - tckdev_net + healthcheck: + test: ["CMD-SHELL", "wget -q http://localhost/ -O /dev/null || exit 1"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s environment: - TZ=Asia/Kuala_Lumpur @@ -83,6 +96,12 @@ services: networks: - tckdev_net restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "wget -q http://localhost:80/login -O /dev/null || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s volumes: pgdata: diff --git a/docs/05-FEATURES.md b/docs/05-FEATURES.md index 08944d99..e87e42ea 100644 --- a/docs/05-FEATURES.md +++ b/docs/05-FEATURES.md @@ -93,6 +93,8 @@ These routes require both authentication and admin privileges (`admin` middlewar |---|---| | `GET /stationmanagement` | List all stations (paginated, 5 per page). | | `POST /stationmanagement/store` | Add a new station. | +| `POST /stationmanagement/import` | Bulk import stations from a CSV file. | +| `GET /stationmanagement/csvtemplate` | Download a sample CSV template for station imports. | | `POST /stationmanagement/{stationid}/update` | Edit an existing station. | | `DELETE /stationmanagement/{stationid}/delete` | Delete a station. |