feat(lps): P2 시크릿 env 주입 + Chrome 프로필 영속 볼륨
프로덕션에서 시크릿을 이미지에 굽지 않고 env 로 주입, 재시작 시 챌린지 쿠키 유지. - server_configs: 시크릿 env override 추가(house 의 DB override 패턴 확장) — OPENAI_API_KEY/MODEL, DECODO_HOST/USERNAME/PASSWORD/COST_PER_GB, NAVER_KEYS="id:sec,...". 로컬은 env 미설정 → config.local.toml 그대로. - worker_main: Chrome 프로필 경로를 LPS_PROFILE_DIR(기본 /tmp)로 env 화 → 영속 볼륨 마운트 가능. - docker-compose: lps-worker 에 lps-profiles 볼륨(/profiles) + 시크릿 env 주입 주석 예시. - config.example: 프로덕션 env 주입 목록 문서화. 검증: env override 동작(OpenAI/DECODO/Naver), 프로필이 /profiles 볼륨에 Cookies 포함 저장(cf_clearance 유지). 89 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
94d4e54d5e
commit
3a8d669970
4 files changed
+45
-2
No files matched your search
@@ -143,6 +143,15 @@ services:
|
||||
DB_HOST: host.docker.internal
|
||||
PYTHONUNBUFFERED: "1"
|
||||
WORKER_CONCURRENCY: "1" # 상품 동시 검색 수(워커별 브라우저 세트, Chrome 4×N)
|
||||
LPS_PROFILE_DIR: /profiles # Chrome 프로필을 영속 볼륨에 → 재시작해도 cf_clearance 유지(재웜업 회피)
|
||||
# ── 프로덕션 시크릿 주입(이미지에 안 굽고 env 로). 아래 주석 해제 후 값 채우거나 secrets 매니저 연동 ──
|
||||
# OPENAI_API_KEY: ${OPENAI_API_KEY}
|
||||
# DECODO_USERNAME: ${DECODO_USERNAME}
|
||||
# DECODO_PASSWORD: ${DECODO_PASSWORD}
|
||||
# DECODO_HOST: ${DECODO_HOST}
|
||||
# NAVER_KEYS: ${NAVER_KEYS} # "id1:secret1,id2:secret2"
|
||||
volumes:
|
||||
- lps-profiles:/profiles # Chrome 프로필(쿠키) 영속
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
shm_size: "1gb" # Chrome 는 /dev/shm 을 많이 씀 — 부족하면 탭 크래시
|
||||
@@ -150,3 +159,6 @@ services:
|
||||
logging:
|
||||
driver: json-file
|
||||
options: { max-size: "10m", max-file: "5" }
|
||||
|
||||
volumes:
|
||||
lps-profiles:
|
||||
Reference in new issue
Block a user