🚀 ci: add todo-backend and todo-web to CI/CD pipeline

- Add Dockerfile and entrypoint for todo-backend
- Add todo-backend and todo-web services to docker-compose.staging.yml
- Add todo to cd-staging-tagged.yml workflow options and port mappings
- Add todo-backend and todo-web to ci-main.yml build matrix
- Enable CI builds on dev branch (staging deployments)
- Fix workflow bug: add --force-recreate to handle stale containers
This commit is contained in:
Wuesteon 2025-12-09 15:52:48 +01:00
parent 3808f2951d
commit 3cf0a43cf3
5 changed files with 148 additions and 1 deletions

View file

@ -21,6 +21,7 @@ on:
- zitare
- presi
- mana-core-auth
- todo
apps:
description: 'Apps to deploy (comma-separated: backend,web,landing or "all")'
required: true
@ -104,6 +105,7 @@ jobs:
PROJECT_APPS[zitare]="backend,web"
PROJECT_APPS[presi]="backend,web"
PROJECT_APPS[mana-core-auth]="service"
PROJECT_APPS[todo]="backend,web"
# Expand "all" to available apps
if [ "$APPS" == "all" ]; then
@ -153,6 +155,7 @@ jobs:
manadeck) PORT="3009" ;;
zitare) PORT="3007" ;;
presi) PORT="3008" ;;
todo) PORT="3018" ;;
esac
HEALTH_PATH="/api/health"
;;
@ -289,7 +292,7 @@ jobs:
docker compose up -d --no-deps --force-recreate \$SERVICE_NAME
else
echo "Service \$SERVICE_NAME not found in compose, starting..."
docker compose up -d \$SERVICE_NAME
docker compose up -d --force-recreate \$SERVICE_NAME
fi
# Wait for startup

View file

@ -9,6 +9,7 @@ on:
push:
branches:
- main
- dev
workflow_dispatch:
concurrency:
@ -26,6 +27,8 @@ jobs:
- { name: 'mana-core-auth', path: 'services/mana-core-auth', port: '3001' }
- { name: 'chat-backend', path: 'apps/chat/apps/backend', port: '3002' }
- { name: 'chat-web', path: 'apps/chat/apps/web', port: '3000' }
- { name: 'todo-backend', path: 'apps/todo/apps/backend', port: '3018' }
- { name: 'todo-web', path: 'apps/todo/apps/web', port: '5188' }
fail-fast: false
steps:
- name: Checkout code