diff --git a/schedules/anchoring/.dockerignore b/schedules/anchoring/.dockerignore new file mode 100644 index 0000000..6a5ed5a --- /dev/null +++ b/schedules/anchoring/.dockerignore @@ -0,0 +1,11 @@ +# 시크릿 — 이미지 레이어에 절대 넣지 않는다(런타임 마운트/env 주입) +config.toml +config.*.toml + +__pycache__/ +*.pyc +.pytest_cache/ +.venv/ +tests/ +docs/ +*.md diff --git a/schedules/anchoring/Dockerfile b/schedules/anchoring/Dockerfile index 7e7f156..866a44f 100644 --- a/schedules/anchoring/Dockerfile +++ b/schedules/anchoring/Dockerfile @@ -5,8 +5,8 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt +# config.toml 은 이미지에 넣지 않는다(시크릿이 이미지 레이어에 남음) — 런타임 마운트 또는 env 로 주입 COPY src ./src -COPY config.toml* ./ ENV PYTHONPATH=/app/src \ PYTHONUNBUFFERED=1 diff --git a/schedules/anchoring/docker-compose.yml b/schedules/anchoring/docker-compose.yml index de276b1..d414f9f 100644 --- a/schedules/anchoring/docker-compose.yml +++ b/schedules/anchoring/docker-compose.yml @@ -24,6 +24,10 @@ services: 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