Add docker health checks, CSV import docs

This commit is contained in:
root
2026-05-21 11:21:20 +08:00
parent 0937d14faf
commit d68afb7d03
2 changed files with 22 additions and 1 deletions

View File

@@ -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:

View File

@@ -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. |