-
Notifications
You must be signed in to change notification settings - Fork 0
7 prepare deployment #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pstackebrandt
wants to merge
16
commits into
main
Choose a base branch
from
7-prepare-deployment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0ac228a
Prepare deployment #7: Add Azure deployment workflow and Application …
pstackebrandt 82a9e59
Optimize creation and fixing of MD files by Cursor #8
pstackebrandt 4c1195b
#8 Add comprehensive documentation and guidelines for Markdown, proje…
pstackebrandt 755e767
#8 Remove outdated documentation files and enhance README structure
pstackebrandt 4d69b88
#8 Update troubleshooting documentation and add markdown fixing scripts
pstackebrandt a006d06
#7 Enhance dockerfile, .dockerignore, .gitignore documentation and fi…
pstackebrandt f123971
Update documentation and scripts for versioning and markdown guidelines
pstackebrandt 415ae0d
Remove outdated implementation plan from versioning documentation
pstackebrandt 1f7f50f
#7 Rename api testing request file and update documentation and add new
pstackebrandt 328b956
Update prepublishing checklist to clarify Application Insights setup
pstackebrandt 8e53dae
Update README and documentation for project clarity and structure
pstackebrandt 8ce1468
Revise prepublishing and publishing checklists for training project
pstackebrandt f01f97b
#8, #7 Update Docker configuration, API configuration, and documentation
pstackebrandt baee401
Update Azure deployment documentation and add training guide
pstackebrandt b639e97
Add script to create Azure service principal with acrpull role
pstackebrandt 8e5ce00
Enhance Azure service principal creation script
pstackebrandt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| description: Rules for maintaining project checklists | ||
| globs: "**/*checklist.md" | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| # Checklist Maintenance Rules | ||
|
|
||
| ## Status Indicators | ||
|
|
||
| - ✅ Completed: Task is fully implemented and verified | ||
| - - [ ] Todo: Task not yet started or completed | ||
| - 🔄 In-progress: Work has started but not completed | ||
| - ⚠️ Blocked: Waiting on external dependency | ||
|
|
||
| ## Organization | ||
|
|
||
| - Group by functional area (Docker, Security, etc.) | ||
| - List completed items first within each section | ||
| - Place priority items immediately after completed items | ||
| - Use logical workflow order for sections | ||
|
|
||
| ## Formatting | ||
|
|
||
| - Use h1 (`#`) for document title | ||
| - Use h2 (`##`) for main sections | ||
| - Use h3 (`###`) for subsections | ||
| - Use bullet lists for checklist items | ||
| - Use 2-space indentation for nested items | ||
| - Keep line length under 120 characters | ||
| - Use code blocks with language identifiers | ||
|
|
||
| ## Example | ||
|
|
||
| ```markdown | ||
| ## Security | ||
|
|
||
| ✅ HTTPS redirection configured | ||
| ✅ Sensitive files excluded from source control | ||
|
|
||
| - [ ] Add rate limiting for API endpoints | ||
| - [ ] Implement CORS policy configuration | ||
| ``` | ||
|
|
||
| ## Update Process | ||
|
|
||
| 1. Review project status to identify completed items | ||
| 2. Update status indicators accordingly | ||
| 3. Add new requirements that have emerged | ||
| 4. Remove duplicate or obsolete items | ||
| 5. Ensure cross-references remain valid | ||
|
|
||
| ## Rule Types | ||
|
|
||
| - **Manual** (`alwaysApply: false`): Only applied when explicitly requested | ||
| - **Always** (`alwaysApply: true`): Applied across all matching files automatically | ||
| - **Auto Attached**: Automatically attaches to relevant files based on content (Cursor feature) | ||
| - **Agent Requested**: Applied when the AI determines they're relevant (Cursor feature) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| description: Guidelines for creating and using Git Bash scripts | ||
| globs: | ||
| alwaysApply: false | ||
| --- | ||
| --- | ||
| description: Guidelines for creating and using Git Bash scripts | ||
| globs: "*.sh" | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # Selected Git Bash Scripting Guidelines | ||
|
|
||
| ## File Format | ||
| - Use LF line endings (not CRLF) | ||
| - Use UTF-8 without BOM | ||
| - Start with shebang: `#!/bin/bash` | ||
|
|
||
| ## Path Handling | ||
| - Use forward slashes in paths: `/path/to/dir` | ||
| - Always quote paths with spaces | ||
| - Use relative paths when possible | ||
|
|
||
| ## Error Handling | ||
| - Use `set -e` for immediate exit on error | ||
| - Check exit codes: `if [ $? -ne 0 ]; then ... fi` | ||
| - Log errors to stderr: `echo "Error: message" >&2` | ||
|
|
||
| ## PowerShell Integration | ||
| - Use `Invoke-GitBash` helper | ||
| - Example: | ||
| ```powershell | ||
| Invoke-GitBash "./scripts/your-script.sh" | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| description: Guidelines for creating Markdown files | ||
| globs: "*.md", "*.markdown", "README*" | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # Markdown Best Practices | ||
|
|
||
| ## Document Structure | ||
| - Use a single `# Title` at the top | ||
| - Follow with a brief description | ||
| - Organize content with hierarchical headings (`##`, `###`) | ||
| - Include a TOC for documents longer than 3 sections | ||
|
|
||
| ## Formatting | ||
| - Keep lines under 120 characters for readability | ||
| - Break long lines at natural points (after periods, commas, or logical breaks) | ||
| - Use **bold** for emphasis, *italics* for terminology | ||
| - Code blocks: Triple backticks with language identifier | ||
| - Inline code: Single backticks for commands, variables | ||
| - Horizontal rules (`---`) only to separate major sections | ||
|
|
||
| ## Lists | ||
| - Use ordered lists (1. 2. 3.) for sequential steps | ||
| - Use unordered lists (- or *) for non-sequential items | ||
| - Maintain consistent indentation for nested lists | ||
|
|
||
| ## Links and References | ||
| - Use descriptive link text: `[descriptive text](mdc:URL)` | ||
| - Prefer relative links for project files | ||
| - Group related references at document bottom | ||
|
|
||
| ## Images | ||
| - Include alt text: `` | ||
| - Keep width under 900px for readability | ||
| - Store images in dedicated `/assets` or `/images` folder | ||
|
|
||
| ## Tables | ||
| - Use tables for structured data comparisons | ||
| - Include header row and alignment indicators | ||
| - Keep tables simple; avoid nested tables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| description: Guidelines for creating PowerShell scripts | ||
| globs: "*.ps1", "*.psm1", "*.psd1" | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # PowerShell Scripting Guidelines | ||
|
|
||
| Prefer PowerShell 7 commands for Windows 11, not Bash syntax. | ||
| Prefer PowerShell-native approaches over cmd.exe commands. | ||
|
|
||
| ## Command Syntax | ||
| - Use PowerShell cmdlets: `Get-ChildItem` (not `ls`), `Set-Location` (not `cd`) | ||
| - Flags use single hyphen (`-Force`) | ||
| - Command separation: `;` (not `&&`) | ||
|
|
||
| ## Path Handling | ||
| - Use backslashes in Windows paths: `C:\Users\` | ||
| - Use `Join-Path` for path construction | ||
| - Always quote paths with spaces | ||
|
|
||
| ## Variables and Environment | ||
| - Variables: `$variable`, string interpolation: `"$(...)"` | ||
| - Environment variables: `$env:VARIABLE` | ||
|
|
||
| ## Input/Output | ||
| - Piping: `|` (with proper object handling) | ||
| - Redirection: `>`, `>>`, `2>` | ||
|
|
||
| ## Error Handling | ||
| - Check `$LASTEXITCODE` after external commands | ||
| - Use try/catch blocks for risky operations | ||
| - Log errors with `Write-Error` to stderr | ||
|
|
||
| ## Git Bash Integration | ||
| - Use `Invoke-GitBash.ps1` for bash scripts | ||
| - Handle path conversions | ||
| - Propagate exit codes correctly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| description: Guidelines for choosing between PowerShell and Git Bash | ||
| globs: | ||
| alwaysApply: false | ||
| --- | ||
| --- | ||
| description: Guidelines for choosing between PowerShell and Git Bash | ||
| globs: "*.ps1", "*.sh", "*.psm1", "*.psd1", "*.md" | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # Shell Choice Guidelines | ||
|
|
||
| - Use PowerShell for Windows-specific tasks and system automation | ||
| - Use Git Bash for cross-platform scripts and git operations | ||
| - Prefer PowerShell when working with .NET or Windows services |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| **/.classpath | ||
| **/.dockerignore | ||
| **/.env | ||
| **/.git | ||
| **/.gitignore | ||
| **/.project | ||
| **/.settings | ||
| **/.toolstarget | ||
| **/.vs | ||
| **/.vscode | ||
| **/*.*proj.user | ||
| **/*.dbmdl | ||
| **/*.jfm | ||
| **/azds.yaml | ||
| **/bin | ||
| **/charts | ||
| **/docker-compose* | ||
| **/Dockerfile* | ||
| **/node_modules | ||
| **/npm-debug.log | ||
| **/obj | ||
| **/secrets.dev.yaml | ||
| **/values.dev.yaml | ||
| LICENSE | ||
| README.md | ||
| .cursor/ | ||
| .vs/ | ||
| _testbuild/ | ||
| docs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Build and Deploy to Azure | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Login to Azure Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ secrets.REGISTRY_URL }} | ||
| username: ${{ secrets.REGISTRY_USERNAME }} | ||
| password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| push: true | ||
| tags: ${{ secrets.REGISTRY_URL }}/clarusmens-api:${{ github.sha }} | ||
|
|
||
| - name: Login to Azure | ||
| uses: azure/login@v2 | ||
| with: | ||
| creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
|
||
| - name: Deploy to Azure App Service | ||
| uses: azure/webapps-deploy@v3 | ||
| with: | ||
| app-name: "clarusmens-api" | ||
| images: ${{ secrets.REGISTRY_URL }}/clarusmens-api:${{ github.sha }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,26 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Bump Patch Version", | ||
| "type": "shell", | ||
| "command": "pwsh -File ${workspaceFolder}/Update-Version.ps1 -VersionType patch", | ||
| "problemMatcher": [], | ||
| "group": "none" | ||
| }, | ||
| { | ||
| "label": "Bump Minor Version", | ||
| "type": "shell", | ||
| "command": "pwsh -File ${workspaceFolder}/Update-Version.ps1 -VersionType minor", | ||
| "problemMatcher": [], | ||
| "group": "none" | ||
| }, | ||
| { | ||
| "label": "Bump Major Version", | ||
| "type": "shell", | ||
| "command": "pwsh -File ${workspaceFolder}/Update-Version.ps1 -VersionType major", | ||
| "problemMatcher": [], | ||
| "group": "none" | ||
| } | ||
| ] | ||
| } | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Bump Patch Version", | ||
| "type": "shell", | ||
| "command": "pwsh -File ${workspaceFolder}/scripts/Update-Version.ps1 -VersionType patch", | ||
| "problemMatcher": [], | ||
| "group": "none" | ||
| }, | ||
| { | ||
| "label": "Bump Minor Version", | ||
| "type": "shell", | ||
| "command": "pwsh -File ${workspaceFolder}/scripts/Update-Version.ps1 -VersionType minor", | ||
| "problemMatcher": [], | ||
| "group": "none" | ||
| }, | ||
| { | ||
| "label": "Bump Major Version", | ||
| "type": "shell", | ||
| "command": "pwsh -File ${workspaceFolder}/scripts/Update-Version.ps1 -VersionType major", | ||
| "problemMatcher": [], | ||
| "group": "none" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium