-
-
Notifications
You must be signed in to change notification settings - Fork 158
feat(docs): adding haproxy configuration example #640
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
kirby0025
wants to merge
26
commits into
seanmorley15:development
Choose a base branch
from
kirby0025:feat/docs_haproy
base: development
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 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e847091
feat(docs): adding haproxy configuration example
kirby0025 4bc7f3b
Implement code changes to enhance functionality and improve performance
seanmorley15 0723ad7
Update nl.json
Ycer0n dc67ad1
Merge pull request #694 from Ycer0n/patch-1
seanmorley15 12a5221
feat(security): add Trivy security scans for Docker images and source…
seanmorley15 d865454
feat(security): restructure Trivy scans for improved clarity and orga…
seanmorley15 5026243
fix(dependencies): update Django version to 5.2.2
seanmorley15 d797095
style(workflows): standardize quotes and fix typo in frontend-test.yml
seanmorley15 b8d30d2
feat(workflows): add job names for clarity in backend and frontend te…
seanmorley15 e335d7d
refactor(workflows): remove path filters from pull_request and push t…
seanmorley15 42982d5
Merge branch 'development' into feat/docs_haproy
seanmorley15 00a6e67
feat(workflows): add paths to push and pull_request triggers for back…
seanmorley15 bad7021
Merge branch 'development' into feat/docs_haproy
seanmorley15 b6e5e4a
refactor(workflows): simplify trigger paths for backend and frontend …
seanmorley15 ed11d29
fix(package): add missing pnpm overrides for esbuild in package.json
seanmorley15 b4407dc
fix(workflows): add missing severity parameter for Trivy filesystem scan
seanmorley15 6665422
fix(workflows): add missing severity parameter for Docker image scans…
seanmorley15 295ecd1
fix(workflows): remove MEDIUM severity from Trivy scans in security w…
seanmorley15 1609c9e
Merge branch 'development' into feat/docs_haproy
seanmorley15 5308ec2
added-fix-image-deletion (#681)
taninme ce3fa9d
fix(docs): enhance HAProxy description in installation guide
seanmorley15 7b3d7aa
Merge branch 'development' into feat/docs_haproy
seanmorley15 493a139
Rename Adventures to Locations (#696)
seanmorley15 c461f7b
Import and Export Functionality (#698)
seanmorley15 fc358b9
enhance haproxy example
kirby0025 83e6510
Merge branch 'development' into feat/docs_haproy
kirby0025 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
Some comments aren't visible on the classic Files Changed page.
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
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 |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Trivy Security Scans | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - development | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - development | ||
| schedule: | ||
| - cron: "0 8 * * 1" # Weekly scan on Mondays at 8 AM UTC | ||
|
|
||
| jobs: | ||
| filesystem-scan: | ||
| name: Trivy Filesystem Scan (Source Code) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Scan source code (Filesystem) with Trivy | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| scan-type: fs | ||
| scan-ref: . | ||
| format: table | ||
| exit-code: 1 | ||
| ignore-unfixed: true | ||
| severity: CRITICAL,HIGH | ||
|
|
||
| image-scan: | ||
| name: Trivy Docker Image Scan (Backend & Frontend) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| # Optional login step (remove if you're not pushing images to GHCR) | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build backend Docker image | ||
| run: docker build -t adventurelog-backend ./backend | ||
|
|
||
| - name: Build frontend Docker image | ||
| run: docker build -t adventurelog-frontend ./frontend | ||
|
|
||
| - name: Scan backend Docker image with Trivy | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| image-ref: adventurelog-backend | ||
| format: table | ||
| exit-code: 1 | ||
| ignore-unfixed: true | ||
| severity: CRITICAL,HIGH | ||
|
|
||
| - name: Scan frontend Docker image with Trivy | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| image-ref: adventurelog-frontend | ||
| format: table | ||
| exit-code: 1 | ||
| ignore-unfixed: true | ||
| severity: CRITICAL,HIGH |
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,4 +1,4 @@ | ||
| Django==5.2.1 | ||
| Django==5.2.2 | ||
| djangorestframework>=3.15.2 | ||
| django-allauth==0.63.3 | ||
| drf-yasg==1.21.4 | ||
|
|
||
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
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,23 @@ | ||
| # Installation with Haproxy | ||
|
|
||
| HAProxy is a free and open source software that provides a high availability load balancer and Proxy for TCP and HTTP-based applications. | ||
|
|
||
| You need to make the frontend and the backend available in order to have your AdventureLog working properly. | ||
| To do this, you will need to add 2 ACLs and 2 corresponding HAProxy backends in your haproxy configuration : | ||
| - One for your regular Adventurelog domain that will direct the requests to the frontend. | ||
| - One for the URLs that need to access the backend. | ||
|
|
||
| Example : | ||
|
|
||
| ``` | ||
| acl is_adventurelog hdr_sub(Host) -i adventurelog | ||
| acl is_adventurelog_backend path_beg /media/ or /admin/ | ||
|
|
||
| use_backend adventurelog_media if is_adventurelog is_adventurelog_backend | ||
| use_backend adventurelog if is_adventurelog | ||
|
|
||
| backend alog | ||
| server adventurelog 192.168.1.100:3000 check | ||
| backend adventurelog_backend | ||
| server adventurelog_media 192.168.1.100:8000 check | ||
| ``` | ||
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.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't really used HAProxy, but I would think the 192.x ip address shoul be either 127.0.0.1 or localhost, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on your local network. My local is haproxy balancing to other VMs, but if you do container on the same host it shoud be 127.0.0.1 yes.