🛠️ 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 reloadand hot-swapping configurations overdocker 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 thesaastypo in CLI flags (-p sass) and environment variables. - Environment Parity: Maintain
dsass(Dev) andsass(Prod) as distinct projects to prevent resource collisions. - Variable Safety: Use
${VAR:-default}in Docker Compose with extreme caution; ensure defaults align with thesassproject naming convention.
3. Deployment & Maintenance SOP
- Configuration Updates: 1. Push template to container via
docker cp. 2. Process viaenvsubst(escaping Nginx internal variables). 3. Gracefulreload. - Maintenance Mode:
- Enable:
touch /tmp/maintenance.enableviarun.sh. - Logic: Nginx template intercepts via
if (-f ...)and returns a503pointing to a localmaintenance.html.
- Enable:
- Database Migrations: Use the Lockfile Pattern in the
webcontainer 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/sasstypos) 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.
