Skip to content

Sl 245 merge deploy updates into dev#105

Merged
sle3pyy merged 90 commits intodevfrom
SL-245-merge-deploy-updates-into-dev
Mar 23, 2026
Merged

Sl 245 merge deploy updates into dev#105
sle3pyy merged 90 commits intodevfrom
SL-245-merge-deploy-updates-into-dev

Conversation

@sle3pyy
Copy link
Copy Markdown
Member

@sle3pyy sle3pyy commented Mar 23, 2026

This pull request focuses on improving deployment documentation and environment configuration for both production and development, along with minor frontend code cleanups. The most significant changes include a comprehensive rewrite of the deployment/README.md for clarity and completeness, updates to environment variable templates and scripts, and small frontend refactors.

Deployment and Documentation Improvements:

  • Major rewrite and expansion of deployment/README.md:

    • Updated architecture diagrams and service descriptions.
    • Clear separation between production and development deployment instructions.
    • Added instructions for using .env.prod.example and .env.dev.example files.
    • Updated quick start commands and clarified service endpoints for both environments. [1] [2] [3] [4] [5] [6]
  • Updated example environment files and related configuration:

    • Changed POSTGRES_SERVER and KEYCLOAK_URL values in api/.env.prod.example for local development compatibility.
    • Updated KEYCLOAK_ISSUER_URL to include /realms/platform.
  • Improved environment variable copying script:

    • The scripts/copy-env-examples.sh script now copies .env.prod.example files instead of .env.example, and updates output messages accordingly.

Frontend and Build Configuration:

  • Updated Docker Compose frontend build argument:
    • Changed VITE_API_URL in deployment/docker-compose.yml to use ${API_URL} directly, removing the /api suffix.

Frontend Code Cleanup:

  • Refactored phishing kits and sending profile components:
    • Added isFetching and refetch to PhishingKitsPage props and passed them to child components. [1] [2]
    • Removed unused props (onTest, hasChangesSinceLastTest) from sending profile components for cleaner interfaces. [1] [2] [3] [4]

sle3pyy and others added 30 commits February 26, 2026 12:30
This pull request introduces several significant changes focused on improving code quality, security, and automation in the project. The main highlights are the addition of new GitHub Actions workflows for deployment and branch protection, a refactor and consolidation of dependency management in the API, and the cleanup of legacy or unused scripts and modules.

CI/CD and Branch Protection Automation:

    Added a new GitHub Actions workflow (.github/workflows/CD-workflow.yml) that automates the continuous deployment process. This workflow checks out the repository, sets up Docker Buildx, prepares environment files, and rebuilds/redeploys the Docker stack on pushes to the main branch.
    Introduced a new branch gatekeeper workflow (.github/workflows/check-merge-rules.yml) to enforce that only the dev branch or branches starting with hotfix can be merged into main, enhancing branch protection.
    Minor update to existing branch check workflow (.github/workflows/check-branch.yml) by removing a redundant echo statement for cleaner output.

API Dependency and Security Refactoring:

    Replaced the legacy api/src/core/deps.py with a new, more robust api/src/core/dependencies.py. The new module uses stricter token verification (via JWKS), introduces URL-safe realm handling, and provides improved dependency injection patterns for database sessions and realm extraction. 
    Removed the unused or legacy api/src/core/org_manager.py module, which previously handled Keycloak operations for org managers. Its removal suggests a shift toward a more centralized or secure approach for these operations.

Codebase Cleanup and Maintenance:

    Deleted the api/fetch_defaults.py and api/reproduce_issue.py scripts, indicating they are no longer needed for the current workflow or have been superseded by other mechanisms. 
    Cleaned up the database initialization logic in api/src/core/db.py by removing unnecessary model import comments and obsolete test code for sending profiles. 

CI/CD and Workflow Automation

    Added a new CD workflow for automated Docker-based deployment on main branch pushes (.github/workflows/CD-workflow.yml).
    Introduced a branch gatekeeper workflow to restrict merges into main to only dev or hotfix branches (.github/workflows/check-merge-rules.yml).
    Minor cleanup in branch check workflow for clearer output (.github/workflows/check-branch.yml).

API Dependency and Security Improvements

    Replaced api/src/core/deps.py with api/src/core/dependencies.py, improving token verification, dependency injection, and security for realm extraction. 
    Removed api/src/core/org_manager.py, consolidating or deprecating legacy Keycloak management logic.

General Cleanup

    Deleted legacy scripts: api/fetch_defaults.py and api/reproduce_issue.py. 
    Cleaned up database initialization and removed obsolete test code in api/src/core/db.py.
…pping"

This reverts commit 1e386be, reversing
changes made to 2bd17f1.
@sonarqubecloud
Copy link
Copy Markdown

@sle3pyy sle3pyy merged commit c7d8412 into dev Mar 23, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants