Developer Profile & SOP: Project SASS

🛠️ Developer Profile & SOP: Project SASS

Last Updated: 2026-03-03

Project Context: Multi-container Flask/Nginx/Postgres/Redis stack managed via run.sh on Unraid.


1. Architectural Philosophy (The “Architect” Pattern)

  • Zero-Downtime First: Prioritize nginx -s reload and hot-swapping configurations over docker restart.
  • Dynamic Runtime State: Use Redis as the source of truth for app-level toggles (e.g., Verbose Debug Mode) to avoid container restarts.
  • File-Based Triggers: Use ephemeral files (e.g., /tmp/maintenance.enable) for instant, infrastructure-level switches that Nginx can sense immediately.

2. Naming & Environment Standards

  • Project Identity: The project name is strictly sass (two ‘s’s). Avoid the saas typo in CLI flags (-p sass) and environment variables.
  • Environment Parity: Maintain dsass (Dev) and sass (Prod) as distinct projects to prevent resource collisions.
  • Variable Safety: Use ${VAR:-default} in Docker Compose with extreme caution; ensure defaults align with the sass project naming convention.

3. Deployment & Maintenance SOP

  • Configuration Updates: 1. Push template to container via docker cp. 2. Process via envsubst (escaping Nginx internal variables). 3. Graceful reload.
  • Maintenance Mode:
    • Enable: touch /tmp/maintenance.enable via run.sh.
    • Logic: Nginx template intercepts via if (-f ...) and returns a 503 pointing to a local maintenance.html.
  • Database Migrations: Use the Lockfile Pattern in the web container command to prevent race conditions during scaling (replicas > 1).

4. Communication & Debugging Style

  • Code over Prose: Provide direct, copy-pasteable CLI commands first.
  • The “Why” Matters: Explain the side effects (e.g., why a 404 occurred instead of a 503) to build system intuition.
  • Proactive Correction: Gently flag common pitfalls (like missing opening braces in Bash variables or saas/sass typos) before they break the build.

💾 How to use this SOP

Option A (Current Thread): I have applied these rules to my internal “understanding” for this session. No further action is needed.

Option B (New Thread): If you start a new conversation, paste the content of this SOP as your first message to “warm up” my context on how you like to work.

Leave a Reply