

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345678# Docker and Containerization Rules910## Dockerfile Best Practices1112### Multi-Stage Builds13```dockerfile14# Build stage15FROM node:22-alpine AS builder16WORKDIR /app17COPY package*.json ./18RUN npm ci19COPY . .20RUN npm run build2122# Production stage23FROM node:22-alpine AS production24WORKDIR /app25COPY --from=builder /app/dist ./dist26CMD ["node", "dist/main.js"]27```2829### Layer Optimization30- Order from least to most frequently changing31- Copy dependency files before source code32- Use `.dockerignore` to exclude unnecessary files3334```dockerfile35# ✅ Good - Dependencies cached separately36COPY package.json package-lock.json ./37RUN npm ci38COPY . .3940# ❌ Bad41COPY . .42RUN npm ci43```4445### Base Images46- Use official images47- Prefer Alpine for smaller size48- Pin specific versions (avoid `latest`)4950```dockerfile51# ✅ Good52FROM python:3.11-alpine53FROM node:22-alpine5455# ❌ Bad56FROM python:latest57```5859## Python Dockerfile (hermes-api)6061```dockerfile62FROM python:3.11-slim as base6364ENV PYTHONUNBUFFERED=1 \65 PYTHONDONTWRITEBYTECODE=1 \66 PIP_NO_CACHE_DIR=16768WORKDIR /app6970# System dependencies (ffmpeg for yt-dlp)71RUN apt-get update && apt-get install -y ffmpeg && \72 rm -rf /var/lib/apt/lists/*7374# Python dependencies75COPY pyproject.toml uv.lock ./76RUN pip install uv && uv pip install --system -r uv.lock7778COPY . .7980# Non-root user81RUN useradd -m -u 1000 hermes && \82 chown -R hermes:hermes /app8384USER hermes8586EXPOSE 80008788CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]89```9091## Node.js Dockerfile (hermes-app)9293```dockerfile94FROM node:22-alpine AS builder95WORKDIR /app9697COPY package.json pnpm-lock.yaml ./98RUN corepack enable pnpm && pnpm install --frozen-lockfile99100COPY . .101RUN pnpm build102103# Production104FROM nginx:alpine AS production105COPY nginx.conf /etc/nginx/conf.d/default.conf106COPY --from=builder /app/dist /usr/share/nginx/html107108EXPOSE 80109CMD ["nginx", "-g", "daemon off;"]110```111112## .dockerignore113114```dockerignore115# Version control116.git117.gitignore118119# Dependencies120node_modules121__pycache__122*.pyc123124# Environment125.env126.env.*127!.env.example128129# Development130*.log131*.md132!README.md133.vscode134135# Build artifacts136dist137build138*.egg-info139140# Tests141tests142**/__tests__143*.test.js144*.test.ts145146# Docker147Dockerfile148.dockerignore149docker-compose*.yml150```151152## docker-compose.yml153154```yaml155version: '3.8'156157services:158 api:159 build:160 context: ./packages/hermes-api161 dockerfile: Dockerfile162 container_name: hermes-api163 ports:164 - "8000:8000"165 environment:166 - HERMES_SECRET_KEY=${HERMES_SECRET_KEY}167 - REDIS_URL=redis://redis:6379/0168 volumes:169 - ./packages/hermes-api/data:/app/data170 - ./packages/hermes-api/downloads:/app/downloads171 depends_on:172 - redis173 restart: unless-stopped174175 app:176 build:177 context: ./packages/hermes-app178 dockerfile: Dockerfile179 container_name: hermes-app180 ports:181 - "3000:80"182 environment:183 - VITE_API_URL=http://localhost:8000184 depends_on:185 - api186 restart: unless-stopped187188 redis:189 image: redis:7-alpine190 container_name: hermes-redis191 ports:192 - "6379:6379"193 volumes:194 - redis_data:/data195 restart: unless-stopped196197 celery:198 build:199 context: ./packages/hermes-api200 dockerfile: Dockerfile201 container_name: hermes-celery202 command: celery -A app.tasks.celery_app worker --loglevel=info203 environment:204 - REDIS_URL=redis://redis:6379/0205 volumes:206 - ./packages/hermes-api/downloads:/app/downloads207 depends_on:208 - redis209 restart: unless-stopped210211volumes:212 redis_data:213```214215216### Volume Mounts217218```yaml219# Development - mount source code220volumes:221 - ./packages/hermes-api:/app222 - /app/node_modules223224# Production - persistent data only225volumes:226 - ./data:/app/data227 - ./downloads:/app/downloads228```229230### Environment Variables231```yaml232environment:233 - SECRET_KEY=${SECRET_KEY:-changeme}234 - DEBUG=${DEBUG:-false}235 - LOG_LEVEL=${LOG_LEVEL:-info}236```237238## Security239240### Non-Root Users241```dockerfile242RUN useradd -m -u 1000 appuser243RUN chown -R appuser:appuser /app244USER appuser245```246247### Secrets248- Never hardcode secrets249- Use environment variables250- Use build-time arguments sparingly251252## Health Checks253254```dockerfile255HEALTHCHECK --interval=30s --timeout=3s --retries=3 \256 CMD curl -f http://localhost:8000/api/v1/health || exit 1257```258259```yaml260services:261 api:262 healthcheck:263 test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]264 interval: 30s265 timeout: 3s266 retries: 3267```268269## Development vs Production270271### Development Override272```yaml273# docker-compose.override.yml274services:275 api:276 volumes:277 - ./packages/hermes-api:/app278 environment:279 - DEBUG=true280 command: uvicorn app.main:app --reload --host 0.0.0.0281```282283### Production284```yaml285# docker-compose.prod.yml286services:287 api:288 build:289 target: production290 environment:291 - DEBUG=false292 restart: always293```294295Usage:296```bash297# Development298docker compose up299300# Production301docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d302```303
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/30-tests.mdc · 46 | Cursor rules | buildteststylearch+4 | 85/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-app.mdc · 46 | Cursor rules | lint-formatstylearchtypes+5 | 88/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-api.mdc · 46 | Cursor rules | stylearchdependenciesapi+2 | 77/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-app-components.mdc · 46 | Cursor rules | archtypesuiperformance+1 | 65/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-app-routes.mdc · 46 | Cursor rules | archapiuido-not | 65/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/00-project.mdc · 46 | Cursor rules | setuplint-formatstylearch+4 | 89/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-db.mdc · 46 | Cursor rules | teststylearchtesting-strategy+3 | 73/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-app-hooks.mdc · 46 | Cursor rules | lint-formatstylearchtypes+3 | 73/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/30-docs.mdc · 46 | Cursor rules | setuplint-formatstylearch+3 | 81/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/techsquidtv-hermes-cursor-rules-30-docker)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.