bc5df775953cf3a0232d33e627ecde155bc9301f
Replaced `SELECT *` statements across multiple data models with explicit column lists to improve query performance, reduce data transfer, and increase code clarity. This is part of the Phase 2 refactoring plan. - Refactored queries in the following models: - projectModel - toolsModel - attendanceModel - dailyIssueReportModel - issueTypeModel - workReportModel - userModel - dailyWorkReportModel fix(api): Add missing volume mounts to docker-compose Modified docker-compose.yml to mount the `config`, `middlewares`, `utils`, and `services` directories into the API container. This fixes a `MODULE_NOT_FOUND` error that caused the container to crash on startup. feat(db): Add migration for missing project columns Created a new database migration to add `is_active`, `project_status`, and `completed_date` columns to the `projects` table, resolving an inconsistency between the model code and the schema. docs: Add deployment notes Added a new markdown file to document the testing (macOS, Docker Desktop) and production (Synology NAS, Container Manager) environments.
TK-FB-Project - 통합 실행 가이드
⚙️ 사전 준비
환경 변수 설정 (필수)
처음 실행하기 전에 환경 변수 파일을 생성해야 합니다:
# 1. .env.example을 복사하여 .env 파일 생성
cp .env.example .env
# 2. .env 파일을 편집하여 실제 비밀번호로 변경
nano .env # 또는 vi, code 등 사용
# 3. 강력한 비밀번호로 변경 (예시)
# MYSQL_ROOT_PASSWORD=your_secure_password_here
# MYSQL_PASSWORD=your_secure_password_here
# JWT_SECRET=your_random_jwt_secret_min_32_chars
중요: .env 파일은 절대 Git에 커밋하지 마세요!
🚀 한 번에 모든 서비스 실행
🎯 간편 실행 (권장)
cd /Users/hyungi/docker/TK-FB-Project
./start.sh
🛑 간편 중지
./stop.sh
📋 직접 실행
docker-compose up -d
docker-compose down
📊 서비스 목록
| 서비스 | 포트 | 접속 URL | 설명 |
|---|---|---|---|
| 웹 UI | 20000 | http://localhost:20000 | 메인 웹 인터페이스 |
| API 서버 | 20005 | http://localhost:20005 | Node.js API 서버 ✅ |
| FastAPI 브릿지 | 20010 | http://localhost:20010 | Python FastAPI 서비스 |
| phpMyAdmin | 20080 | http://localhost:20080 | DB 관리도구 |
| MariaDB | 20306 | - | 데이터베이스 서버 |
🛠️ 관리 명령어
모든 서비스 중지
cd /Users/hyungi/docker/TK-FB-Project
docker-compose down
서비스 상태 확인
docker ps | grep fb_
로그 확인
docker-compose logs -f
💾 데이터베이스 정보
- 호스트: localhost:20306
- 데이터베이스: hyungi (
.env파일의MYSQL_DATABASE) - 사용자: hyungi_user (
.env파일의MYSQL_USER) - 비밀번호:
.env파일에서 설정한MYSQL_PASSWORD - Root 비밀번호:
.env파일에서 설정한MYSQL_ROOT_PASSWORD
참고: 실제 비밀번호는 .env 파일을 확인하세요.
✨ 주요 개선사항
- 통합 실행: 한 번의 명령으로 모든 서비스 실행
- 깔끔한 DB 초기화: 마이그레이션 오류 해결
- 일관된 네이밍: fb_ 접두사로 컨테이너 구분
- 안정적인 포트: 20000번대 포트 사용
Description
Languages
Python
81.2%
JavaScript
8.5%
HTML
7.1%
CSS
1.6%
Cython
0.8%
Other
0.7%