Skip to content
Merged

Stage #514

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
672f213
Clean up env example just to make dummy change to test staging workflow
dakotabenjamin Jul 17, 2026
c33a919
ci: use reusable gh worflow for builds, remove redundant workflow
spwoodcock Jul 17, 2026
0a752cf
build(backend): add whitenoise dep to prepare to serving frontend (op…
spwoodcock Jul 17, 2026
5d23914
feat(backend): add option to serve frontend from django (disabled by …
spwoodcock Jul 17, 2026
368741c
build(frontend): productionise the frontend dockerfile
spwoodcock Jul 17, 2026
83fc96a
build(k8s): finalise the helm chart to match drone-tm pattern of bund…
spwoodcock Jul 17, 2026
a04acdb
fix(django): better url regex to handle trailing slashes when not fro…
spwoodcock Jul 20, 2026
dbd10e1
Merge pull request #513 from hotosm/build/finalise-chart
spwoodcock Jul 20, 2026
7a7c206
ci: update all workflows to latest versions for sha tagging
spwoodcock Jul 20, 2026
4195279
build(k8s): replicate hotosm/website setup for helm chart simple post…
spwoodcock Jul 15, 2026
3c5311c
ci: use reusable gh worflow for builds, remove redundant workflow
spwoodcock Jul 17, 2026
0f5f6a8
build(backend): add whitenoise dep to prepare to serving frontend (op…
spwoodcock Jul 17, 2026
cbd8b07
feat(backend): add option to serve frontend from django (disabled by …
spwoodcock Jul 17, 2026
d7d8325
build(frontend): productionise the frontend dockerfile
spwoodcock Jul 17, 2026
cd0d10f
build(k8s): finalise the helm chart to match drone-tm pattern of bund…
spwoodcock Jul 17, 2026
05e6140
fix(django): better url regex to handle trailing slashes when not fro…
spwoodcock Jul 20, 2026
8b78634
ci: update all workflows to latest versions for sha tagging
spwoodcock Jul 20, 2026
f299b8b
Merge branch 'main' into stage
dakotabenjamin Jul 20, 2026
e03d692
Merge branch 'develop' into stage
dakotabenjamin Jul 20, 2026
4a7da90
expand regex to support positional arg
kshitijrajsharma Jul 20, 2026
8b682db
fix(fair-stage): Set kubelet probe headers to localhost
dakotabenjamin Jul 20, 2026
f2fac4e
fix(helm): change readiness probe api to remove trailing slash
dakotabenjamin Jul 20, 2026
80af47d
Merge branch 'develop' into stage
dakotabenjamin Jul 21, 2026
7a273e9
fix(frontend): add envvars to chart frontend build
dakotabenjamin Jul 21, 2026
3f1933d
fix(frontend): fix stac envvar key name
dakotabenjamin Jul 21, 2026
53d5a90
fix(helm): set envvars in helm chart
dakotabenjamin Jul 21, 2026
c20bae2
fix(helm): fix envar setting range name
dakotabenjamin Jul 21, 2026
f08df0f
build(frontend): add config for runtime env injection on frontend to …
spwoodcock Jul 21, 2026
5a0866e
Merge pull request #515 from hotosm/build/frontend-runtime-env
dakotabenjamin Jul 21, 2026
d102652
fix(login): use correct url for hanko login
dakotabenjamin Jul 21, 2026
4655935
fix(chore): docker cleanup
kshitijrajsharma Jul 24, 2026
cbd513f
chore(fair): migrate container registry path to fair/backend OCI name…
yshmael Jul 26, 2026
e31dff3
feat: Deploy Production Frontend to S3 & CloudFront
yshmael Jul 26, 2026
63ab8a6
Merge pull request #519 from hotosm/chore/docker-cleanup
kshitijrajsharma Jul 27, 2026
1f43bfa
ci(rename): renames all the workflow built images to follow conventio…
kshitijrajsharma Jul 27, 2026
a301535
Merge pull request #518 from yshmael/feature/fair-prod
kshitijrajsharma Jul 27, 2026
b103938
Merge branch 'develop' into chore/rename-images
kshitijrajsharma Jul 27, 2026
4c877b6
refactor: additional refs updated to new image name convention
spwoodcock Jul 27, 2026
0d962ea
Merge pull request #520 from hotosm/chore/rename-images
spwoodcock Jul 27, 2026
05c5463
refactor: final rename of images zenml-postgres
spwoodcock Jul 27, 2026
4880d7b
Merge branch 'develop' of https://github.com/hotosm/fAIr into develop
spwoodcock Jul 27, 2026
0a480b9
docs: start documenting the infra / deployment process
spwoodcock Jul 27, 2026
5e0c6df
docs: tweak doc formatting
spwoodcock Jul 27, 2026
3e84983
docs: final updates to dev-->stage-->prod model registration via STAC…
spwoodcock Jul 27, 2026
e60fabe
build: docker
kshitijrajsharma Jul 28, 2026
2dc3bfe
fix(docker): add env
kshitijrajsharma Jul 28, 2026
3fef03e
fix(fix): kpi stats
kshitijrajsharma Jul 28, 2026
8312e7f
fix(api): examples
kshitijrajsharma Jul 28, 2026
0c78f48
fix(api): fixes endpoint for the feature type basemodel categories ba…
kshitijrajsharma Jul 28, 2026
2134c90
fix(api): public predictions
kshitijrajsharma Jul 28, 2026
1eeb307
fix(publicview): fix the permission of category and make it modelcate…
kshitijrajsharma Jul 28, 2026
e0b2800
fix(cors): echo the creds in cors
kshitijrajsharma Jul 29, 2026
18a6470
fix(infra): use correct command for django-q in helm
dakotabenjamin Jul 29, 2026
cf1a583
Merge branch 'develop' into stage
dakotabenjamin Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/backend_build_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Docker Images
on:
pull_request:
branches:
- master
- develop
paths:
- "backend/**"
- ".github/workflows/docker_build.yml"

jobs:
# Backend API image. amd64-only (GDAL + source-built tippecanoe make arm64
# emulation slow). Build-only check for PRs
backend-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@4.0.3
with:
context: backend/
dockerfile: Dockerfile
image_name: ghcr.io/${{ github.repository_owner }}/fair/api
push: false
82 changes: 82 additions & 0 deletions .github/workflows/deploy_frontend_s3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Deploy Production Frontend to S3 & CloudFront

on:
push:
branches:
- main
paths:
- 'frontend/**'
- '.github/workflows/deploy_frontend_s3.yml'
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9.8.0

- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Build Static Production Assets
env:
VITE_BASE_API_URL: "https://api.fair.hotosm.org/api/v1/"
VITE_NODE_ENV: "production"
VITE_FAIR_PROD_URL: "https://fair.hotosm.org/"
VITE_HANKO_URL: "https://login.hotosm.org"
run: pnpm run build

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::670261699094:role/Github-AWS-OIDC
aws-region: us-east-1

- name: Sync Static Assets to S3
run: |
aws s3 sync dist/ s3://hotosm-fair-frontend-production \
--delete \
--cache-control "public, max-age=31536000, immutable" \
--exclude "index.html"

# Sync index.html with no-cache so client browsers instantly receive app updates
aws s3 cp dist/index.html s3://hotosm-fair-frontend-production/index.html \
--cache-control "no-cache, no-store, must-revalidate"

- name: Invalidate CloudFront CDN Cache
run: |
DISTRIBUTION_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Aliases.Items && contains(Aliases.Items, 'fair.hotosm.org')].Id | [0]" --output text)
if [ "$DISTRIBUTION_ID" != "None" ] && [ -n "$DISTRIBUTION_ID" ]; then
aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION_ID" --paths "/*"
fi
71 changes: 0 additions & 71 deletions .github/workflows/docker_build.yml

This file was deleted.

93 changes: 0 additions & 93 deletions .github/workflows/docker_publish_image.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
frontend-unit-test:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@3.2.0
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@4.0.3
with:
working_dir: frontend
Build_On_Ubuntu:
Expand Down Expand Up @@ -54,31 +54,22 @@ jobs:
working-directory: ./frontend
run: pnpm run build

Docker_Build:
runs-on: ubuntu-latest
# Build-only checks for PRs. Push happens in docker_publish_image.yml on
# merge to master/stage/develop.
docker-build-dev:
needs: [frontend-unit-test]
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@4.0.3
with:
context: frontend/
dockerfile: Dockerfile.dev
image_name: ghcr.io/${{ github.repository_owner }}/fair/frontend
push: false

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build dev image
uses: docker/build-push-action@v6
with:
context: ./frontend
file: ./frontend/Dockerfile.dev
push: false
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build prod image
uses: docker/build-push-action@v6
with:
context: ./frontend
file: ./frontend/Dockerfile.prod
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
docker-build-prod:
needs: [frontend-unit-test]
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@4.0.3
with:
context: frontend/
dockerfile: Dockerfile.prod
image_name: ghcr.io/${{ github.repository_owner }}/fair/frontend
push: false
Loading
Loading