Updated pm-task.

This commit is contained in:
Ali
2026-04-09 15:29:24 +08:00
parent b1be74b662
commit be760cca0f
2 changed files with 44 additions and 17 deletions

View File

@@ -16,11 +16,13 @@ Tasks are defined in the first argument.
- `(none)` : Shows a numbered list menu of all subdirectories under the workspace directory, navigates to the selected directory, and runs `ls -lah`
- `restart` : Runs `docker compose down`, `sleep 1`, and `docker compose up` commands
- `start` : Runs `docker compose up` command
- `stop` : Runs `docker compose down` command
- `start` / `up` : Runs `docker compose up` command
- `stop` / `down` : Runs `docker compose down` command
- `ps` : Runs `watch docker ps` to monitor running containers
- `stats` : Runs `docker stats` to monitor container resource usage
- `logs` / `log` : Runs `docker logs -f <container_name>` to follow container logs
- `sh` / `bash` / `shell` : Runs `docker exec -it <container_name> bash` to access container shell
- `reload` : Reloads the nginx service if the container is running
- `build` / `rebuild` : Builds containers with `docker compose build`, optionally restarts containers, and reloads nginx
- `upgrade` : Pulls latest images and upgrades containers with `docker compose up -d --remove-orphans --force-recreate`
- `--help` : Displays available tasks and usage information