xiaohongshu
xiaohongshu
sayt-cnt
How to write Dockerfile + compose.yaml — the develop/integrate service convention, multi-stage targets, dind helpers. Use when containerizing a project, writing docker compose services, or setting up integration tests.
Full skill instructions
sayt launch starts a containerized development environment. sayt integrate runs integration tests in containers. Both use Docker Compose with a specific service convention.
sayt launchdocker compose down -v --timeout 0 --remove-orphansdocker compose run --build --service-ports developsayt integratedocker compose down -v --timeout 0 --remove-orphans--no-cache: builds without Docker layer cache firstdocker compose up integrate --abort-on-container-failure --exit-code-from integrate --force-recreate --build --renew-anon-volumes --remove-orphans --attach-dependenciesdocker compose logs or docker compose down -v when done)sayt expects two services in compose.yaml:
develop service (for sayt launch)The development service runs your app with hot reload, debugging, port mapping, etc.
services:
develop:
command: ./gradlew dev -t # Your dev command
ports:
- "8080:8080" # Expose ports to host
build:
network: host
context: ../.. # Monorepo root (or ".")
dockerfile: services/myapp/Dockerfile
secrets:
- host.env
target: debug # Dockerfile stage for dev
volumes:
- //var/run/docker.sock:/var/run/docker.sock
entrypoint:
- /monorepo/plugins/devserver/dind.sh
secrets:
- host.env
network_mode: host
integrate service (for sayt integrate)The integration service runs your test suite in an isolated container.
services:
integrate:
command: "true" # Overridden by Dockerfile CMD
build:
network: host
context: ../..
dockerfile: services/myapp/Dockerfile
secrets:
- host.env
target: integrate # Dockerfile stage for integration
secrets:
host.env:
environment: HOST_ENV # Injected by sayt's dind helper
The HOST_ENV secret contains Docker credentials, Kubernetes config, and dind connection info.
sayt expects Dockerfiles with at least two targets:
debug target (used by develop)Contains the full development environment with source code, tools, and hot reload:
FROM node:22 AS debug
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
CMD ["pnpm", "dev"]
integrate target (used by integrate)Extends debug with integration test execution:
FROM debug AS integrate
COPY tests/ tests/
CMD ["pnpm", "test:int"]
# Base with tools
FROM eclipse-temurin:21 AS debug
WORKDIR /app
COPY gradlew gradlew.bat gradle.properties settings.gradle.kts build.gradle.kts ./
COPY gradle/ gradle/
RUN ./gradlew dependencies
COPY src/main/ src/main/
COPY .vscode/ .vscode/
RUN ./gradlew assemble
COPY src/test/ src/test/
# Integration tests
FROM debug AS integrate
COPY src/it/ src/it/
CMD ["./gradlew", "integrationTest"]
FROM node:22 AS debug
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
CMD ["pnpm", "dev"]
FROM debug AS integrate
CMD ["pnpm", "test:int", "--run"]
sayt provides dind helpers for scenarios where containers need to talk to Docker (e.g., testcontainers):
DOCKER_HOST, TESTCONTAINERS_HOST_OVERRIDE, and DOCKER_AUTH_CONFIG are injectedThis enables testcontainers-based integration tests to create sibling containers.
sayt services use network_mode: host by default. This means:
localhostvolumes:
root-dot-docker-cache-mount: {}
services:
develop:
command: ./gradlew dev -t
ports:
- "8080:8080"
build:
network: host
context: ../..
dockerfile: services/tracker/Dockerfile
secrets:
- host.env
target: debug
volumes:
- //var/run/docker.sock:/var/run/docker.sock
- ${HOME:-~}/.skaffold/cache:/root/.skaffold/cache
entrypoint:
- /monorepo/plugins/devserver/dind.sh
secrets:
- host.env
network_mode: host
integrate:
command: "true"
build:
network: host
context: ../..
dockerfile: services/tracker/Dockerfile
secrets:
- host.env
target: integrate
secrets:
host.env:
environment: HOST_ENV
sayt integrate automatically runs docker compose down -v to clean updocker compose logs # View all logs
docker compose logs integrate # View integration service logs
docker compose down -v # Clean up manually when done
develop and integrate — These are the services sayt expectstarget: in build — debug for develop, integrate for integratecontext to monorepo root — Usually ../.. from a service directoryhost.env secret — Required for dind and credential forwardingnetwork_mode: host for develop — Simplifies networkingcommand: "true" for integrate — Let the Dockerfile CMD handle execution!sayt help launch 2>&1 || true
!sayt help integrate 2>&1 || true
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience