b67362a73396e4431f304b88fe87a397d6616874
- Adds knex.js to manage database schema changes systematically. - Creates an initial migration file based on `hyungi_schema_v2.sql` to represent the current database state. - Adds npm scripts (`db:migrate`, `db:rollback`, etc.) for easy execution of migration tasks. - Archives legacy SQL files and old migration scripts into the `db_archive/` directory to prevent confusion and clean up the project structure.
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%