Skip to content

Commit 45de58e

Browse files
authored
Merge pull request #418 from MODSetter/dev
feat: added celery and removed background_tasks for MQ's
2 parents 031dc05 + c80bbfa commit 45de58e

27 files changed

+1672
-1046
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Docker Specific Env's Only - Can skip if needed
2+
3+
# Celery Config
4+
REDIS_PORT=6379
5+
FLOWER_PORT=5555
6+
17
# Frontend Configuration
28
FRONTEND_PORT=3000
39
NEXT_PUBLIC_API_URL=http://backend:8000

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
<!--- Provide a general summary of your changes in the Title above -->
1+
<!--- Summarize your pull request in a few sentences -->
22

33
## Description
4-
<!--- Describe your changes in detail -->
4+
<!--- Clearly describe what has changed in this pull request -->
55

66
## Motivation and Context
77
<!--- Why is this change required? What problem does it solve? -->
88
<!--- If this PR relates to an open issue, please link to the issue here: FIX #123 -->
99
FIX #
1010

11-
## Changes Overview
12-
<!-- List the primary changes/improvements made in this PR -->
13-
-
1411

1512
## Screenshots
1613
<!-- If applicable, add screenshots or images to demonstrate the changes visually -->
@@ -19,27 +16,26 @@ FIX #
1916
<!-- Document any API changes if applicable -->
2017
- [ ] This PR includes API changes
2118

22-
## Types of changes
23-
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
24-
- [ ] Bug fix (non-breaking change which fixes an issue)
25-
- [ ] New feature (non-breaking change which adds functionality)
26-
- [ ] Performance improvement (non-breaking change which enhances performance)
27-
- [ ] Documentation update
28-
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
29-
30-
## Testing
31-
<!-- Describe the tests that have been run to verify your changes -->
32-
- [ ] I have tested these changes locally
33-
- [ ] I have added/updated unit tests
34-
- [ ] I have added/updated integration tests
35-
36-
## Checklist:
37-
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
38-
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
39-
- [ ] My code follows the code style of this project
40-
- [ ] My change requires documentation updates
41-
- [ ] I have updated the documentation accordingly
42-
- [ ] My change requires dependency updates
43-
- [ ] I have updated the dependencies accordingly
44-
- [ ] My code builds clean without any errors or warnings
45-
- [ ] All new and existing tests passed
19+
## Change Type
20+
<!--- Indicate what kind(s) of changes this PR includes: -->
21+
- [ ] Bug fix
22+
- [ ] New feature
23+
- [ ] Performance improvement
24+
- [ ] Refactoring
25+
- [ ] Documentation
26+
- [ ] Dependency/Build system
27+
- [ ] Breaking change
28+
- [ ] Other (specify):
29+
30+
## Testing Performed
31+
<!--- Briefly describe how you have tested these changes and what verification was performed -->
32+
- [ ] Tested locally
33+
- [ ] Manual/QA verification
34+
35+
## Checklist
36+
<!--- Please confirm the following by marking with an 'x' as appropriate -->
37+
- [ ] Follows project coding standards and conventions
38+
- [ ] Documentation updated as needed
39+
- [ ] Dependencies updated as needed
40+
- [ ] No lint/build errors or new warnings
41+
- [ ] All relevant tests are passing

.github/workflows/docker-publish.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,40 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
build_and_push_backend:
8-
runs-on: ubuntu-latest
9-
permissions:
10-
contents: read
11-
packages: write
12-
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v4
7+
# build_and_push_backend:
8+
# runs-on: ubuntu-latest
9+
# permissions:
10+
# contents: read
11+
# packages: write
12+
# steps:
13+
# - name: Checkout repository
14+
# uses: actions/checkout@v4
1515

16-
- name: Set up QEMU
17-
uses: docker/setup-qemu-action@v3
16+
# - name: Set up QEMU
17+
# uses: docker/setup-qemu-action@v3
1818

19-
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@v3
19+
# - name: Set up Docker Buildx
20+
# uses: docker/setup-buildx-action@v3
2121

22-
- name: Log in to GitHub Container Registry
23-
uses: docker/login-action@v3
24-
with:
25-
registry: ghcr.io
26-
username: ${{ github.actor }}
27-
password: ${{ secrets.GITHUB_TOKEN }}
22+
# - name: Log in to GitHub Container Registry
23+
# uses: docker/login-action@v3
24+
# with:
25+
# registry: ghcr.io
26+
# username: ${{ github.actor }}
27+
# password: ${{ secrets.GITHUB_TOKEN }}
2828

29-
- name: Build and push backend image
30-
uses: docker/build-push-action@v5
31-
with:
32-
context: ./surfsense_backend
33-
file: ./surfsense_backend/Dockerfile
34-
push: true
35-
tags: ghcr.io/${{ github.repository_owner }}/surfsense_backend:${{ github.sha }}
36-
platforms: linux/amd64,linux/arm64
37-
labels: |
38-
org.opencontainers.image.source=${{ github.repositoryUrl }}
39-
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
40-
org.opencontainers.image.revision=${{ github.sha }}
29+
# - name: Build and push backend image
30+
# uses: docker/build-push-action@v5
31+
# with:
32+
# context: ./surfsense_backend
33+
# file: ./surfsense_backend/Dockerfile
34+
# push: true
35+
# tags: ghcr.io/${{ github.repository_owner }}/surfsense_backend:${{ github.sha }}
36+
# platforms: linux/amd64,linux/arm64
37+
# labels: |
38+
# org.opencontainers.image.source=${{ github.repositoryUrl }}
39+
# org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
40+
# org.opencontainers.image.revision=${{ github.sha }}
4141

4242
build_and_push_frontend:
4343
runs-on: ubuntu-latest

.github/workflows/docker_build.yaml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -124,52 +124,52 @@ jobs:
124124
git ls-remote --tags origin | grep "refs/tags/${{ steps.tag_version.outputs.next_version }}" || (echo "Tag push verification failed!" && exit 1)
125125
echo "Tag successfully pushed."
126126
127-
build_and_push_backend_image:
128-
runs-on: ubuntu-latest
129-
needs: tag_release # Depends on the tag being created successfully
130-
permissions:
131-
packages: write # Need permission to write to GHCR
132-
contents: read # Need permission to read repo contents (checkout)
133-
134-
steps:
135-
- name: Checkout code
136-
uses: actions/checkout@v4
137-
138-
- name: Login to GitHub Container Registry
139-
uses: docker/login-action@v3
140-
with:
141-
registry: ghcr.io
142-
username: ${{ github.repository_owner }}
143-
password: ${{ secrets.GITHUB_TOKEN }}
144-
145-
- name: Set up QEMU
146-
uses: docker/setup-qemu-action@v3
147-
148-
- name: Set up Docker Buildx
149-
uses: docker/setup-buildx-action@v3
150-
151-
- name: Extract metadata (tags, labels) for Docker build
152-
id: meta
153-
uses: docker/metadata-action@v5
154-
with:
155-
images: ghcr.io/${{ github.repository_owner }}/surfsense_backend
156-
tags: |
157-
# Use the tag generated in the previous job
158-
type=raw,value=${{ needs.tag_release.outputs.new_tag }}
159-
# Optionally add 'latest' tag if building from the default branch
160-
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch }}
161-
162-
- name: Build and push surfsense backend
163-
uses: docker/build-push-action@v5
164-
with:
165-
context: ./surfsense_backend
166-
push: true
167-
tags: ${{ steps.meta.outputs.tags }}
168-
labels: ${{ steps.meta.outputs.labels }}
169-
platforms: linux/amd64,linux/arm64
170-
# Optional: Add build cache for faster builds
171-
cache-from: type=gha
172-
cache-to: type=gha,mode=max
127+
# build_and_push_backend_image:
128+
# runs-on: ubuntu-latest
129+
# needs: tag_release # Depends on the tag being created successfully
130+
# permissions:
131+
# packages: write # Need permission to write to GHCR
132+
# contents: read # Need permission to read repo contents (checkout)
133+
134+
# steps:
135+
# - name: Checkout code
136+
# uses: actions/checkout@v4
137+
138+
# - name: Login to GitHub Container Registry
139+
# uses: docker/login-action@v3
140+
# with:
141+
# registry: ghcr.io
142+
# username: ${{ github.repository_owner }}
143+
# password: ${{ secrets.GITHUB_TOKEN }}
144+
145+
# - name: Set up QEMU
146+
# uses: docker/setup-qemu-action@v3
147+
148+
# - name: Set up Docker Buildx
149+
# uses: docker/setup-buildx-action@v3
150+
151+
# - name: Extract metadata (tags, labels) for Docker build
152+
# id: meta
153+
# uses: docker/metadata-action@v5
154+
# with:
155+
# images: ghcr.io/${{ github.repository_owner }}/surfsense_backend
156+
# tags: |
157+
# # Use the tag generated in the previous job
158+
# type=raw,value=${{ needs.tag_release.outputs.new_tag }}
159+
# # Optionally add 'latest' tag if building from the default branch
160+
# type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch }}
161+
162+
# - name: Build and push surfsense backend
163+
# uses: docker/build-push-action@v5
164+
# with:
165+
# context: ./surfsense_backend
166+
# push: true
167+
# tags: ${{ steps.meta.outputs.tags }}
168+
# labels: ${{ steps.meta.outputs.labels }}
169+
# platforms: linux/amd64,linux/arm64
170+
# # Optional: Add build cache for faster builds
171+
# cache-from: type=gha
172+
# cache-to: type=gha,mode=max
173173

174174
build_and_push_ui_image:
175175
runs-on: ubuntu-latest

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)