Files
pos-system/scripts/dev/logs.sh
Ho Ngoc Hai 29c40ea681 Update project documentation and scripts for improved setup and bilingual support
- Enhanced `README.md` with a quick start guide and detailed project structure.
- Updated `SETUP_GUIDE.md` by removing it as it was redundant.
- Improved `local-development.md` and `development.md` with clearer instructions for database migrations.
- Added bilingual comments in various scripts for better understanding and usability.
- Updated `.gitignore` to include specific build scripts while ignoring others.
- Enhanced `scripts` for database management, including backup and seeding functionalities with bilingual support.
2025-12-27 10:12:46 +07:00

33 lines
877 B
Bash
Executable File

#!/bin/bash
SERVICE=$1
# EN: Check usage
# VI: Kiểm tra cách sử dụng
if [ -z "$SERVICE" ]; then
echo "Usage: $0 <service-name> / Cách dùng: $0 <tên-service>"
echo "Example: $0 auth-service"
echo ""
echo "Or use 'docker' to view Docker logs: / Hoặc dùng 'docker' để xem log Docker:"
echo " $0 docker <container-name>"
exit 1
fi
if [ "$SERVICE" = "docker" ]; then
CONTAINER=$2
if [ -z "$CONTAINER" ]; then
echo "Usage: $0 docker <container-name>"
echo "Available containers: / Các container khả dụng:"
docker ps --format "{{.Names}}"
exit 1
fi
# EN: Follow docker logs
# VI: Theo dõi log docker
docker logs -f "$CONTAINER"
else
# EN: Start development logs using pnpm
# VI: Bắt đầu log phát triển sử dụng pnpm
cd "services/$SERVICE"
pnpm dev
fi