o2o-negosium-original/schedules/anchoring/docker-compose.yml
민헌 ffa7dda493 fix(anchoring): 이미지에 config.toml 미포함 — 런타임 마운트 전환·.dockerignore 신설
- Dockerfile 의 COPY config.toml* 제거: 실 시크릿이 이미지 레이어에 구워지는 문제 해소
- .dockerignore 신설로 빌드 컨텍스트에서도 config.toml 차단(이중 방어)
- docker-compose 가 ./config.toml 을 읽기 전용 마운트 — up 전에 파일이 있어야 함
  (없으면 docker 가 디렉터리를 생성해 기동 실패 — 주석·런북에 명시)
- 설정 변경 반영이 리빌드 없이 restart 로 단순화

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:16:45 +09:00

35 lines
1.3 KiB
YAML

# anchoring 자립 서비스 — 루트 compose 와 독립(다른 서버를 건드리지 않음).
# DB 는 기존 외부 PostgreSQL(host.docker.internal), Redis 는 여기 동봉.
# negodata(견적 생성 측)는 이 redis 인스턴스를 REDIS_HOST 로 바라본다(docs/인수인계.md).
# 로그: stdout(json-file) — 로테이션 필수(장기 운영 디스크 보호). 로그 시각은 코드가 KST 로 고정.
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
services:
anchoring-redis:
image: redis:7-alpine
container_name: anchoring-redis
ports:
- "127.0.0.1:6379:6379" # 호스트 로컬만 — 무인증 Redis 를 외부에 열지 않는다(앵커 값 오염 방지)
restart: unless-stopped
logging: *default-logging
anchoring:
build: .
container_name: anchoring
environment:
DB_HOST: host.docker.internal
REDIS_HOST: anchoring-redis
TZ: Asia/Seoul
volumes:
# config.toml(시크릿)은 이미지에 안 굽고 런타임 마운트 — 없으면 파일을 먼저 만들 것
# (cp config.toml.example config.toml — 없이 up 하면 docker 가 디렉터리를 만들어 기동 실패)
- ./config.toml:/app/config.toml:ro
depends_on:
- anchoring-redis
restart: unless-stopped
logging: *default-logging