Files
clean-architecture-backend-…/infra/fileserver/nfs/compose.yml
T
DongHyeonkaandClaude Opus 5 5f10b791d3 chore: record pre-existing uncommitted repository state
Snapshot of the in-flight state that already existed, identically, in both
this worktree and the main checkout before this session began: the initial
HTTP Client platform implementation (previously untracked), the redis-lab
removal, and the JPA / object-storage / notification integration work.

Kept separate from this session's HTTP Client review response, which lands
in the following commit, so the two bodies of work stay reviewable apart.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 16:48:43 +09:00

62 lines
2.1 KiB
YAML

# Network-filesystem certification environment.
#
# A local filesystem cannot reproduce the failures this environment exists to test: a rename whose
# acknowledgement is lost, a stale file handle after the server restarts, and a client that keeps
# writing across a network cut. Those are precisely the cases where "the write failed, retry it" is
# the wrong conclusion, so they are certified against a real NFS server rather than a mock.
#
# Opt in with FILESERVER_NFS_TESTS=true; the default test run does not start this.
#
# docker compose -f infra/fileserver/nfs/compose.yml up -d
# FILESERVER_NFS_TESTS=true ./gradlew :adapter:outbound:fileserver:test
#
# To exercise the ambiguity paths:
# docker compose -f infra/fileserver/nfs/compose.yml restart nfs-server # stale handles
# docker network disconnect fileserver-nfs <client> # lost responses
services:
nfs-server:
image: erichough/nfs-server:2.2.1
container_name: fileserver-nfs-server
privileged: true
environment:
NFS_EXPORT_0: "/exports *(rw,sync,no_subtree_check,no_root_squash,fsid=0)"
NFS_VERSION: "4.2"
NFS_LOG_LEVEL: DEBUG
volumes:
- nfs-exports:/exports
ports:
- "2049:2049"
networks:
- fileserver-nfs
healthcheck:
test: ["CMD", "rpcinfo", "-t", "localhost", "nfs", "4"]
interval: 5s
timeout: 3s
retries: 10
nfs-client:
image: eclipse-temurin:21-jdk
container_name: fileserver-nfs-client
privileged: true
depends_on:
nfs-server:
condition: service_healthy
# hard,intr is the correct production mount: a soft mount turns a slow server into a silent
# short write, which is exactly the corruption the design refuses to accept.
command: >
bash -c "mkdir -p /mnt/fileserver &&
mount -t nfs4 -o hard,timeo=50,retrans=2 nfs-server:/ /mnt/fileserver &&
tail -f /dev/null"
volumes:
- ../../..:/workspace:ro
networks:
- fileserver-nfs
volumes:
nfs-exports:
networks:
fileserver-nfs:
name: fileserver-nfs