-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from CentreForDigitalHumanities/redux
Version 3.0
- Loading branch information
Showing
155 changed files
with
8,175 additions
and
2,546 deletions.
There are no files selected for viewing
This file contains 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,87 @@ | ||
name: Build and Push Docker Images | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
env: | ||
AGENT_IMAGE_NAME: humitifier | ||
AGENT_DOCKERFILE_PATH: ./agent/Dockerfile | ||
AGENT_CONTEXT_PATH: ./agent | ||
SERVER_IMAGE_NAME: humitifier-server | ||
SERVER_DOCKERFILE_PATH: ./humitifier-server/Dockerfile | ||
SERVER_CONTEXT_PATH: ./humitifier-server | ||
|
||
jobs: | ||
build-and-push-agent: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push main image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ${{ env.AGENT_CONTEXT_PATH }} | ||
file: ${{ env.AGENT_DOCKERFILE_PATH }} | ||
push: true | ||
tags: | | ||
ghcr.io/centrefordigitalhumanities/humitifier/${{ env.AGENT_IMAGE_NAME }}:${{ github.ref_name }} | ||
# ghcr.io/centrefordigitalhumanities/humitifier/${{ env.AGENT_IMAGE_NAME }}:latest | ||
|
||
- name: Grype Scan | ||
id: scan | ||
uses: anchore/scan-action@v3 | ||
with: | ||
image: ghcr.io/centrefordigitalhumanities/humitifier/${{ env.AGENT_IMAGE_NAME }}:${{ github.ref_name }} | ||
fail-build: false | ||
|
||
- name: upload Grype SARIF report | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: ${{ steps.scan.outputs.sarif }} | ||
|
||
build-and-push-server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push main image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ${{ env.SERVER_CONTEXT_PATH }} | ||
file: ${{ env.SERVER_DOCKERFILE_PATH }} | ||
push: true | ||
tags: | | ||
ghcr.io/centrefordigitalhumanities/humitifier/${{ env.SERVER_IMAGE_NAME }}:${{ github.ref_name }} | ||
# ghcr.io/centrefordigitalhumanities/humitifier/${{ env.SERVER_IMAGE_NAME }}:latest | ||
|
||
- name: Grype Scan | ||
id: scan | ||
uses: anchore/scan-action@v3 | ||
with: | ||
image: ghcr.io/centrefordigitalhumanities/humitifier/${{ env.SERVER_IMAGE_NAME }}:${{ github.ref_name }} | ||
fail-build: false | ||
|
||
- name: upload Grype SARIF report | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: ${{ steps.scan.outputs.sarif }} |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -10,6 +10,8 @@ data/ | |
docker-compose.yaml | ||
.local/ | ||
.envrc | ||
.idea | ||
node_modules/ | ||
|
||
# Supabase | ||
.branches | ||
|
This file contains 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
5 changes: 2 additions & 3 deletions
5
docker-compose.example.yaml → agent/docker-compose.example.yaml
This file contains 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 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,17 @@ | ||
import asyncio | ||
from humitifier.tasks import app as task_app | ||
from humitifier.logging import logging | ||
|
||
|
||
|
||
async def main(): | ||
"Run scheduler" | ||
logging.info("Starting scheduler") | ||
|
||
sched = asyncio.create_task(task_app.serve()) | ||
|
||
await asyncio.wait([sched]) | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) |
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
Oops, something went wrong.