feat: roster.json 단일 명단 파일 + 핫리로드

호스트에서 직접 편집 가능한 단일 JSON으로 명단 일원화.
앱이 매 요청마다 디스크에서 reload → 컨테이너 재시작 불필요.

변경:
- roster.json 새 형식: {"people": [{"name", "team", "dept", "senior", "notes"}, ...]}
- assign_teams.py: roster.json + legacy participants.json 둘 다 출력
- app.py: get_participants() / get_teams() 매 호출 reload
  - PARTS = get_participants() / TEAMS = get_teams() 함수 안에서 호출
  - 모듈 레벨 PARTICIPANTS/TEAMS 제거
  - load_roster() roster.json 우선, 없으면 legacy fallback
- docker-compose: roster.json + participants.json 둘 다 mount
- Dockerfile: ROSTER env + roster.json COPY

사용자 워크플로:
- 사람 다른 팀 옮기기: roster.json에서 그 사람 'team' 값만 변경
- 자동 배정 재실행: python3 assign_teams.py

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
th-kim0823
2026-04-26 17:43:16 +09:00
parent 3f40f3f47a
commit bf4d3e73cc
6 changed files with 337 additions and 23 deletions

View File

@@ -12,11 +12,12 @@ COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py assign_teams.py ./
COPY participants.json ./
COPY roster.json participants.json ./
EXPOSE 8501
ENV VOTE_DB=/data/votes.db \
ROSTER=/app/roster.json \
PARTICIPANTS=/app/participants.json
CMD ["streamlit", "run", "app.py", \