move_detect/server/deploy/config.template.php
유창욱 3f2823a764 refactor: rename cloud/ to server/ (cafe24 is web hosting, not cloud)
The PHP app runs on Cafe24 shared web hosting -- calling it 'cloud'
was misleading. Renames the directory, the edge client module, and
every doc/script/identifier that used the term.

- cloud/ -> server/ (incl. server/deploy/build_cafe24_package.sh paths)
- edge/cloudclient.py -> edge/serverclient.py, CloudClient -> ServerClient
- cloud/docs/cloud-deploy.md -> server/docs/server-deploy.md
- CLOUD_* env/config keys -> SERVER_*
- tests renamed to match

Tests: PHP 109 pass (4 skipped), pytest 167 pass. dist/ regenerated.
2026-07-20 11:30:52 +09:00

31 lines
2.1 KiB
PHP

<?php
// ============================================================================
// move-detect — 설정 파일 (이 파일만 고치면 됩니다)
// 위치: 카페24 FTP 최상위 /config.php (www/ 안이 아닙니다!)
// 권한: 업로드 후 FTP 클라이언트에서 600 으로 지정하세요. zip/FTP 는 유닉스 권한을
// 옮기지 못하므로 여기서 미리 줄 수 없습니다. _preflight.php 가 확인해줍니다.
// ============================================================================
//
// 고칠 곳은 아래 "1. 데이터베이스" 세 줄뿐입니다. 값은 카페24 관리자 페이지의
// MySQL 정보에서 그대로 복사하세요. 나머지는 손대지 않아도 동작합니다.
//
return [
// ---- 1. 데이터베이스 (반드시 채우세요) ------------------------------
// CHANGEME_DB_NAME → 카페24에서 만든 DB 이름
'db_dsn' => 'mysql:host=localhost;dbname=CHANGEME_DB_NAME;charset=utf8mb4',
'db_user' => 'CHANGEME_DB_USER', // 카페24 MySQL 아이디
'db_pass' => 'CHANGEME_DB_PASSWORD', // 카페24 MySQL 비밀번호 — 비밀. 어디에도 붙여넣지 마세요.
// ---- 2. 저장 경로 (그대로 두세요) -----------------------------------
// 여기서 __DIR__ 은 이 config.php 가 있는 폴더(= FTP 최상위)입니다.
// src/Config.php 의 기본값은 '/../storage/snapshots' 이지만 그것은 src/ 기준이라
// '..' 이 하나 더 붙습니다. 둘 다 결국 같은 <최상위>/storage/snapshots 를 가리킵니다.
'snapshot_dir' => __DIR__ . '/storage/snapshots',
// ---- 3. 조절값 (기본값. 필요할 때만 바꾸세요) ------------------------
'nonce_ttl' => 86400, // 재전송 방지 nonce 보관 시간(초)
'timestamp_window' => 300, // HMAC 허용 시간 오차(초)
'rate_limit_per_min' => 60, // 장비 1대당 분당 이벤트 상한
'ingest_ip_rate_limit_per_min' => 300, // IP 1개당 분당 이벤트 상한 (DoS 방어)
'snapshot_retention_days' => 7, // 작업자 스냅샷 보존일 (PIPA; 지나면 삭제, 0=비활성)
];