-
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.
Preparing to make the repo public (#15)
* renamed in readme, moved to groundlight with github actions * should only publish containers when pulled into main * Changed name in MIT License * removed unused components * removed unused code, fixed docker-compose * cleaned up dockerfiles * renamed in package json * renamed to monitoring-notification-server fixed action step names Co-authored-by: robotrapta <79607467+robotrapta@users.noreply.github.com> * Update .github/workflows/test_building_containers.yaml added useful comment Co-authored-by: robotrapta <79607467+robotrapta@users.noreply.github.com> * fixed opencv-python version, new version isn't built for aarch64 yet * fixed opencv-headless version --------- Co-authored-by: Max McKelvey <maxmckelvey@Maxs-MBP.positronix.local> Co-authored-by: robotrapta <79607467+robotrapta@users.noreply.github.com>
- Loading branch information
1 parent
2c90ffe
commit 1fefdef
Showing
26 changed files
with
204 additions
and
478 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
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,164 @@ | ||
# This is a workflow to build images | ||
name: Build Docker Images | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build-frontend: | ||
# TODO: move these four repetitive jobs into a shared parameterized github action | ||
name: Build Frontend Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | ||
registry: docker.io | ||
|
||
# So now you can use Actions' own caching! | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Build Image to verify it works but don't push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: docker.io/groundlight/monitoring-notification-server-frontend:latest | ||
platforms: linux/amd64,linux/arm64 | ||
file: ./frontend.Dockerfile | ||
push: false | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
|
||
build-frontend-armv7: | ||
name: Build Frontend armv7 Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | ||
registry: docker.io | ||
|
||
# So now you can use Actions' own caching! | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Build Image to verify it works but don't push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: docker.io/groundlight/monitoring-notification-server-frontend:armv7-latest | ||
platforms: linux/arm/v7 | ||
file: ./frontend-armv7.Dockerfile | ||
push: false | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
|
||
build-backend: | ||
name: Build Backend Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | ||
registry: docker.io | ||
|
||
# So now you can use Actions' own caching! | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Build Image to verify it works but don't push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: docker.io/groundlight/monitoring-notification-server-backend:latest | ||
platforms: linux/amd64,linux/arm64 | ||
file: ./backend.Dockerfile | ||
push: false | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
|
||
build-backend-armv7: | ||
name: Build Backend armv7 Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | ||
registry: docker.io | ||
|
||
# So now you can use Actions' own caching! | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Build and Push Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: docker.io/groundlight/monitoring-notification-server-backend:armv7-latest | ||
platforms: linux/arm/v7 | ||
file: ./backend-armv7.Dockerfile | ||
push: false | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
# go here (https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching) | ||
# if cache is overflowing and is breaking |
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
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
Oops, something went wrong.