Skip to content

Commit

Permalink
doc fixes, build tag fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawton committed Feb 5, 2024
1 parent 045e517 commit 2320185
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Build and Deploy
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
types: [opened, synchronize, reopened]
branches: ["main"]
Expand Down Expand Up @@ -57,7 +56,7 @@ jobs:
- name: Sign Image
if: ${{ github.event_name == 'push' && env.branch == 'main' }}
run: |
TAG=${{ env.branch }}-${{ env.sha_short }}
TAG=${{ matrix.facility }}-${{ env.branch }}-${{ env.sha_short }}
image_digest_fe=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ secrets.DOCKER_USERNAME }}/ids-frontend:$TAG)
image_digest_be=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ secrets.DOCKER_USERNAME }}/ids-backend:$TAG)
cosign sign --yes --key env://COSIGN_PRIVATE_KEY $image_digest_fe $image_digest_be
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Please consult the [backend README](backend/README.md) for configuration informa

### Frontend Configuration

Soon (TM).
Please consult the [frontend README](frontend/README.md) for configuration information.

### Shared

Expand Down Expand Up @@ -76,6 +76,28 @@ If you are using the ADH Stack, you will need to add the OAuth2 client credentia
2. Make sure all modules are installed by running `yarn`.
3. Run `yarn dev` to start the dev environment.

## Subdivision Setup

If you are a member of the ADH Partnership, getting started is fairly easy.

1. Open a PR to add your facility's frontend configuration, and adding it to the workflow [here](.github/workflows/build.yml).
2. Setup your cluster as appropriate. You can look at ZAN's GitOps repo for more inforation [here](https://github.com/vpaza/gitops/tree/main/overlays/prod/ids).
1. You will need to setup the configmap to load the backend's configuration. Override any sensitive information (such as session's block and hash keys, database credentials, etc)
utilizing secrets. See the [backend README](backend/README.md) for more information.

If you are not apart of the ADH Partnership, you'll need to do a bit more work as we do not provide building and deployment for non-members.
1. Typically you'll need to clone the repo.
2. You'll need to provide the backend with a YAML configuration. See the [backend README](backend/README.md) for more information. This can be done at runtime.
3. Update frontend/config.json with your desired config. This *must* be done prior to building as the config is embedded into the frontend.
4. Use scripts/build.sh to build the container image. If you don't want to use Docker, you'll need to look at the script and Dockerfile to see the steps needed
to build the frontend and backend.
5. Deploy to your infrastructure as appropriate for it. The ADH Partnership utilizes Kubernetes, so you can look at step #2 above for an example. Any other environments
is up to your webmaster to deploy. You will need a reverse proxy to handle the backend, the frontend is static JavaScript and can be served by any web server.
If you have questions, please find Daniel Hawton (@TheFrozenDev on Discord, in the ZAN or VATUSA servers) and ask. I will not provide detailed step-by-step for all environments
but can answer more general questions and provide guidance.
## License
This project is licensed under the Apache 2.0 license. See the [LICENSE](LICENSE) file for more information. Some packages may have alternate licenses that apply to only code in that directory and inward, which will be noted in the LICENSE file in that directory.
6 changes: 5 additions & 1 deletion shared/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Shared Configs

These are JSON configurations that are shared/used by both the frontend and backend.
These are JSON configurations that are shared/used by both the frontend and backend. This file is not yet used
by the frontend but may in the future.

Currently this file is only run by the backend's update command. Non-ZAN subdivisions do not need to commit their
airports.json file.

## airports.json

Expand Down

0 comments on commit 2320185

Please sign in to comment.