Add external server stats API

This commit is contained in:
DUCK JIN
2026-08-12 17:48:34 +09:00
parent 26baef8448
commit db375a25ed
8 changed files with 155 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ cp .env.production.example .env.production
- `MARIADB_ROOT_PASSWORD`
- `MARIADB_PASSWORD`
- `SESSION_SECRET`
- `SERVER_STATS_TOKEN`
예시:
@@ -63,6 +64,7 @@ MARIADB_DATABASE=tier_cursor
MARIADB_USER=tier_cursor
MARIADB_PASSWORD=very-strong-app-password
SESSION_SECRET=very-strong-random-session-secret
SERVER_STATS_TOKEN=very-strong-dashboard-token
```
## 3. 컨테이너 실행
@@ -87,7 +89,7 @@ docker compose --env-file .env.production -f docker-compose.prod.yml --profile a
```bash
git pull origin main
docker compose --env-file .env.production -f docker-compose.prod.yml up -d --build
sudo docker compose --env-file .env.production -f docker-compose.prod.yml up -d --build
```
- Dockerfile, Nginx 설정, 프런트 소스, 백엔드 소스가 바뀐 경우에는 `--build`를 유지한다.
@@ -170,6 +172,8 @@ docker compose --env-file .env.production -f docker-compose.prod.yml up -d --bui
## 7. 점검 포인트
- 메인 접속: `https://tmaker.sori.studio`
- 헬스체크: `https://tmaker.sori.studio/health`
- 외부 대시보드 통계:
`curl -H "Authorization: Bearer $SERVER_STATS_TOKEN" https://tmaker.sori.studio/api/server-stats`
- 로그인 후 새로고침 또는 `내 티어표` 진입 시 세션이 유지되는지 확인
- 관리자 로그인 후:
- 게임 생성