문제: infra/ 43개 중 12개는 코드·테스트·workflow·스크립트 어디서도
읽지 않는다(httpclient·jpa·messaging·notification의 toxiproxy compose와
README). nginx 설정, Kubernetes PVC 인증 job, DB 역할 SQL 셋은 운영
인프라라 개발 repo에 둘 것이 아니다(소유자 결정 2026-11-07). release.yml
의 fileserver-pvc-certification job은 그 매니페스트 문자열만 grep했다.
고른 방법:
- 15개를 지운다.
- 운영 조건만 그 기능 문서에 한국어로 남긴다.
docs/fileserver/operations.md 「운영 환경이 지켜야 할 조건」(nginx
internal location·alias·X-Accel-Redirect 헤더 제거·스트리밍, PVC
ReadWriteOnce·fsGroup), storage-certification.md(인증 절차),
docs/jpa/security.md 「역할과 권한」·「서버 설정」(역할 SQL과
jpa/postgres README 내용), docs/messaging/security.md(인증서 SAN).
httpclient TLS README 내용은 docs/httpclient/security.md에 이미 있다.
- release.yml job과 needs 줄, fileserver-pr.yml·pr-adapters.yml의 지운
경로 필터를 지운다.
- fileserver 지원 표의 "Kubernetes ReadWriteOnce PVC — Limited" 행은
근거 job이 없어져 「주장하지 않음」으로 옮긴다.
버린 대안: 인프라 파일을 project-infra로 옮기기(설계 Q6). 그 repo는
특정 프로젝트용이라 범용 템플릿 파일을 받을 자리가 없다.
위험·한계: 지원 표에서 PVC 주장이 빠진다. 파생 서비스가 그 파일을
배포에 썼다면 병합이 지운다(B-50). 클러스터 인증은 이제 배포하는 쪽이
문서 절차로 한다.
검증(desktop, 트리 749a3328, ~/t1-layout-logs/):
- :composition:fileserver-platform:check :app-bootstrap:check
:app-bootstrap:documentContractTest rc=0 (repositoryContractTest,
FileserverDocumentationCoverageTest 실행)
- :verifyStrictLaneStages --dry-run rc=0
- scripts/verify-compose-profile-contracts.sh rc=0 (18 lane)
- check-work-docs.py, 상대 링크 검사 rc=0
Refs: design-docs repo-structure/01-backend-layout.md 4.4, 6.3
BREAKING CHANGE: infra/fileserver/nginx, infra/fileserver/kubernetes, infra/jpa, infra/httpclient, infra/messaging, infra/notification/toxiproxy와 release.yml fileserver-pvc-certification job이 없어진다. docs/upgrade/2026-11-maturity-review.md B-50.
59 lines
3.0 KiB
YAML
59 lines
3.0 KiB
YAML
# =============================================================================
|
|
# Fileserver capability overlay — the storage volume, added only when the capability is selected.
|
|
#
|
|
# Usage, on top of a stack whose image carries the fileserver module (a service that selected
|
|
# `:composition:fileserver-platform`, or COMPOSITION=qualification):
|
|
# docker compose -f docker-compose.yml -f docker-compose.local.yml \
|
|
# -f infra/fileserver/compose/docker-compose.fileserver.yml up
|
|
#
|
|
# Why a file of its own (review 2026-11-01 07-08, capability criterion 7): the default image and
|
|
# docker-compose.yml carry no fileserver, so they no longer carry its volume either. Before, every
|
|
# container — default composition included — mounted a volume for a module it did not have, and the
|
|
# image declared it a VOLUME. It sits with the rest of the capability's infrastructure
|
|
# (infra/fileserver), so removing the capability removes it with that directory.
|
|
#
|
|
# The volume is a named volume, not a tmpfs and not the read-only root: published content must
|
|
# outlive the container that wrote it. Back it with real storage in any deployment that keeps files.
|
|
# Kubernetes does the same job with a PersistentVolumeClaim and the pod's fsGroup; the conditions
|
|
# are in docs/fileserver/operations.md.
|
|
#
|
|
# Ownership. The application runs as the image's non-root `app` account (src/Dockerfile). Docker
|
|
# seeds a fresh named volume's owner from the image directory at the mount point, and the image has
|
|
# no such directory any more; a reused volume or a host bind mount keeps whatever owner it had.
|
|
# Left like that, the volume is root's, every write is refused, and the module's storage probe stops
|
|
# startup with "storage root is not writable". fileserver-storage-init fixes the owner each time
|
|
# before the application starts: it runs once, as root, in the application's own image, and chowns
|
|
# to the `app` account by name, so the owner follows the image rather than a uid written here.
|
|
# =============================================================================
|
|
|
|
services:
|
|
fileserver-storage-init:
|
|
# The image the app service builds and tags. Never pulled: Compose builds it for `app` first,
|
|
# and a registry has no image by this local tag.
|
|
image: caskeleton:${BUILD_VERSION:-0.0.1_local_0000000}-${COMPOSITION:-default}
|
|
pull_policy: never
|
|
user: "0:0"
|
|
entrypoint:
|
|
- "sh"
|
|
- "-c"
|
|
- "chown app:app /var/lib/backend/files && chmod 0750 /var/lib/backend/files"
|
|
read_only: true
|
|
network_mode: none
|
|
volumes:
|
|
- fileserver-data:/var/lib/backend/files
|
|
restart: "no"
|
|
|
|
app:
|
|
depends_on:
|
|
fileserver-storage-init:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
# The mount and the root the module writes to must name one path. This is also the module's
|
|
# default (config/module-defaults/fileserver.yml), stated so that moving one moves the other.
|
|
APP_FILESERVER_PLATFORM_STORAGE_ROOT: "/var/lib/backend/files"
|
|
volumes:
|
|
- fileserver-data:/var/lib/backend/files
|
|
|
|
volumes:
|
|
fileserver-data:
|