Skip to content

Supersede #58: rebase 3-tier preview on main + runtime/CI/doc fixes#63

Open
xMinhx wants to merge 7 commits intomainfrom
SecureCheckPlus-57
Open

Supersede #58: rebase 3-tier preview on main + runtime/CI/doc fixes#63
xMinhx wants to merge 7 commits intomainfrom
SecureCheckPlus-57

Conversation

@xMinhx
Copy link
Copy Markdown
Collaborator

@xMinhx xMinhx commented Apr 19, 2026

Summary

This PR supersedes #58 and keeps the same core goal (local 3-tier preview), rebased onto current main and stabilized for merge.

Contains original commits by @StefanSchubert plus integration/rebase/runtime/docs fixes by @xMinhx.

Why supersede #58

PR #58 currently points to an older head state and does not include the rebase-era fixes required to run reliably on current main.

Key changes

  • Keep 3-tier split (frontend nginx + backend Django + db).
  • Fix frontend image/runtime issues (frontend/Dockerfile, frontend/nginx.conf).
  • Restore dev/prod Docker stages and use Gunicorn in prod with proper LOG_LEVEL expansion.
  • Remove startup makemigrations from backend entrypoint; keep migrate.
  • Align CI to production target (docker-compose.ci.yml uses target: prod).
  • Update docs to match real behavior (QUICK_START.md, PROJEKTÜBERSICHT_3TIER.md, README-DEV-INSTALLATION.md).
  • Ignore generated backend static artifacts (backend/staticfiles/*).

Validation

  • docker compose -f docker-compose-preview.yml up --build -d succeeds.
  • Frontend / responds 200.
  • Backend /check_health responds 200.
  • Unauthenticated /api/projects returns 401/403 (expected).
  • Frontend static via proxy /static/rest_framework/css/default.css returns 200.
  • docker compose -f docker-compose.ci.yml build securecheckplus_server succeeds.
  • Verified Gunicorn process in CI/prod runtime path.

Migration policy rationale

makemigrations is intentionally manual, while migrate remains automatic at startup.

Reason:

  • migration files are code artifacts and should be reviewed/committed explicitly,
  • startup-generated migrations make environments non-deterministic,
  • multiple containers can generate conflicting migration state.

Supersedes

Schubert, Stefan and others added 7 commits April 19, 2026 16:07
Sponsored docker compose preview version.
Agentic Coding Fixed to dockerize the frontend container.
Startet dokumentation change (not finished yet)
- remove invalid frontend image COPY of /staticfiles paths that are outside frontend build context

- proxy /static/ via frontend nginx to backend in preview mode

- stop running makemigrations at container startup; keep migrate only for deterministic schema

- add RUNNER_UID/GID defaults in preview compose to improve first-run reliability

- run gunicorn in Dockerfile prod stage with LOG_LEVEL default expansion

- switch docker-compose.ci.yml build target to prod so CI validates production-like runtime

Reasoning:

These changes remove non-deterministic startup behavior and fix a concrete preview build failure, while making CI exercise the same runtime model used for production deployment.
- update quick-start API/static expectations for 3-tier preview

- document REACT_APP_API_URL same-origin proxy behavior

- clarify makemigrations is a manual dev workflow, not container startup

- point dev installation guide to docker-compose-preview.yml

- ignore generated backend/staticfiles artifacts
@xMinhx xMinhx requested a review from marcus67 April 19, 2026 21:17
@xMinhx xMinhx self-assigned this Apr 19, 2026
@xMinhx xMinhx added bug Something isn't working documentation Improvements or additions to documentation ci / cd / devops backend code quality labels Apr 19, 2026
@xMinhx xMinhx added this to the Post-Go-Live-Cleanup milestone Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working ci / cd / devops code quality documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant