635a130f0b
Build and Push Docker Images / detect-changes (push) Successful in 11s
Build and Push Docker Images / build-auth-api (push) Successful in 1m0s
Build and Push Docker Images / build-employee-api (push) Successful in 1m2s
Build and Push Docker Images / build-transit-api (push) Successful in 1m1s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m5s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m13s
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m15s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s
### Summary of Changes
1. Documentation Consolidation:
• Relocated the docs/ folder and all repository .md files (README.md, DEPLOYMENT.md, DOCKER_README.md,
DOMAINS_README.md, GETTING_STARTED.md, CI_CD_PORTAINER_GUIDE.md, ADMIN_DEPLOYMENT_SUMMARY.md,
SECURITY_PRIVATE_FILES.md, handoff.md, azure-project-plan.md, plus service-specific READMEs) into .
• Updated document links in README.md.
2. AI Agent Project Map:
• Created PROJECT_MAP.md in the project root containing complete architecture diagrams, service specs, ports, DB
schemas, environment variables, and developer workflows.
• Added PROJECT_MAP.md to .gitignore.
3. Monitoring UI & Infrastructure Integration:
• Added monitoring_ui service to docker-compose.yml (port 5175).
• Configured Gitea workflow docker-build.yml for monitoring_ui builds.
• Added CORS middleware headers in index.js.
• Added nginx.conf copy step in Dockerfile.
──────
### Recommended Commit Message
docs: consolidate project documentation into monitoring_ui and add agent project map
- Move all markdown documentation files and docs/ folder into monitoring_ui/docs/
- Update documentation hub index (monitoring_ui/docs/README.md) with relative paths
- Generate comprehensive AI agent reference map (PROJECT_MAP.md) in repository root
- Add PROJECT_MAP.md and monitoring_ui build output/env overrides to .gitignore
- Integrate monitoring_ui service into docker-compose.yml and Gitea CI workflow
- Configure CORS handling in employee_api for monitoring dashboard access
──────
### Alternative Short Commit Message
refactor(docs): move docs to monitoring_ui and create AI agent PROJECT_MAP.md
295 lines
9.5 KiB
YAML
295 lines
9.5 KiB
YAML
name: Build and Push Docker Images
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- auth-api
|
|
- employee-api
|
|
- transit-api
|
|
- error-log-api
|
|
- admin-ui
|
|
- monitoring-ui
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
|
|
env:
|
|
REGISTRY: gitea.testinstance.nl
|
|
IMAGE_NAMESPACE: sven/the-transit-project
|
|
|
|
jobs:
|
|
detect-changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
auth_api: ${{ steps.filter.outputs.auth_api }}
|
|
employee_api: ${{ steps.filter.outputs.employee_api }}
|
|
transit_api: ${{ steps.filter.outputs.transit_api }}
|
|
error_log_api: ${{ steps.filter.outputs.error_log_api }}
|
|
admin_ui: ${{ steps.filter.outputs.admin_ui }}
|
|
monitoring_ui: ${{ steps.filter.outputs.monitoring_ui }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Detect changed paths
|
|
id: filter
|
|
uses: dorny/paths-filter@v3
|
|
with:
|
|
filters: |
|
|
auth_api:
|
|
- 'auth_api/**'
|
|
- 'docker-compose.yml'
|
|
- '.gitea/workflows/docker-build.yml'
|
|
employee_api:
|
|
- 'employee_api/**'
|
|
- 'docker-compose.yml'
|
|
- '.gitea/workflows/docker-build.yml'
|
|
transit_api:
|
|
- 'transit_api/**'
|
|
- 'docker-compose.yml'
|
|
- '.gitea/workflows/docker-build.yml'
|
|
error_log_api:
|
|
- 'error_log_api/**'
|
|
- 'docker-compose.yml'
|
|
- '.gitea/workflows/docker-build.yml'
|
|
admin_ui:
|
|
- 'admin_ui/**'
|
|
- 'docker-compose.yml'
|
|
- '.gitea/workflows/docker-build.yml'
|
|
monitoring_ui:
|
|
- 'monitoring_ui/**'
|
|
- 'docker-compose.yml'
|
|
- '.gitea/workflows/docker-build.yml'
|
|
|
|
build-auth-api:
|
|
needs: detect-changes
|
|
if: ${{ (gitea.ref_name == 'auth-api' || gitea.ref_name == 'dev') && needs.detect-changes.outputs.auth_api == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
image_base="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/auth_api"
|
|
echo "tags<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.sha }}" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push auth_api
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./auth_api
|
|
push: ${{ gitea.event_name == 'push' }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
|
|
build-employee-api:
|
|
needs: detect-changes
|
|
if: ${{ (gitea.ref_name == 'employee-api' || gitea.ref_name == 'dev') && needs.detect-changes.outputs.employee_api == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
image_base="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/employee_api"
|
|
echo "tags<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.sha }}" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push employee_api
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./employee_api
|
|
push: ${{ gitea.event_name == 'push' }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
|
|
build-transit-api:
|
|
needs: detect-changes
|
|
if: ${{ (gitea.ref_name == 'transit-api' || gitea.ref_name == 'dev') && needs.detect-changes.outputs.transit_api == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
image_base="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/transit_api"
|
|
echo "tags<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.sha }}" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push transit_api
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./transit_api
|
|
push: ${{ gitea.event_name == 'push' }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
|
|
build-error-log-api:
|
|
needs: detect-changes
|
|
if: ${{ (gitea.ref_name == 'error-log-api' || gitea.ref_name == 'dev') && needs.detect-changes.outputs.error_log_api == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
image_base="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/error_log_api"
|
|
echo "tags<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.sha }}" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push error_log_api
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./error_log_api
|
|
push: ${{ gitea.event_name == 'push' }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
|
|
build-admin-ui:
|
|
needs: detect-changes
|
|
if: ${{ (gitea.ref_name == 'admin-ui' || gitea.ref_name == 'dev') && needs.detect-changes.outputs.admin_ui == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
image_base="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/admin_ui"
|
|
echo "tags<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.sha }}" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push admin_ui
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./admin_ui
|
|
push: ${{ gitea.event_name == 'push' }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
|
|
build-monitoring-ui:
|
|
needs: detect-changes
|
|
if: ${{ (gitea.ref_name == 'monitoring-ui' || gitea.ref_name == 'dev') && needs.detect-changes.outputs.monitoring_ui == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
image_base="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/monitoring_ui"
|
|
echo "tags<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
echo "${image_base}:${{ gitea.sha }}" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push monitoring_ui
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./monitoring_ui
|
|
push: ${{ gitea.event_name == 'push' }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
|
|
deploy-test-node:
|
|
needs:
|
|
[
|
|
detect-changes,
|
|
build-auth-api,
|
|
build-employee-api,
|
|
build-transit-api,
|
|
build-error-log-api,
|
|
build-admin-ui,
|
|
build-monitoring-ui,
|
|
]
|
|
if: ${{ gitea.event_name == 'push' && gitea.ref_name == 'dev' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Redeploy Portainer stack
|
|
shell: bash
|
|
run: curl --fail --silent --show-error --retry 3 --max-time 30 -X POST "$PORTAINER_WEBHOOK_URL"
|
|
env:
|
|
PORTAINER_WEBHOOK_URL: ${{ secrets.PORTAINER_WEBHOOK_URL }}
|