feat(storage): add storage to CD pipeline and fix Docker config

- Add build context to storage-web in docker-compose (was pulling from
  GHCR, now builds locally like other services)
- Add storage-backend and storage-web to CD change detection and deploy
- Fix mukke health check URLs (were using wrong ports 3035/5015)
- Remove hardcoded port from Dockerfile (use PORT env var from compose)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-22 18:02:40 +01:00
parent 97b610020c
commit 93a7c90f4f
3 changed files with 21 additions and 13 deletions

View file

@ -38,6 +38,8 @@ on:
- contacts-web
- mukke-backend
- mukke-web
- storage-backend
- storage-web
- matrix-mana-bot
concurrency:
@ -76,6 +78,8 @@ jobs:
contacts-web: ${{ steps.changes.outputs.contacts-web }}
mukke-backend: ${{ steps.changes.outputs.mukke-backend }}
mukke-web: ${{ steps.changes.outputs.mukke-web }}
storage-backend: ${{ steps.changes.outputs.storage-backend }}
storage-web: ${{ steps.changes.outputs.storage-web }}
matrix-mana-bot: ${{ steps.changes.outputs.matrix-mana-bot }}
any-changes: ${{ steps.changes.outputs.any-changes }}
steps:
@ -131,11 +135,13 @@ jobs:
check_changes "contacts-web" "apps/contacts/apps/web/" "apps/contacts/packages/"
check_changes "mukke-backend" "apps/mukke/apps/backend/" "apps/mukke/packages/"
check_changes "mukke-web" "apps/mukke/apps/web/" "apps/mukke/packages/"
check_changes "storage-backend" "apps/storage/apps/backend/" "apps/storage/packages/"
check_changes "storage-web" "apps/storage/apps/web/" "apps/storage/packages/"
check_changes "matrix-mana-bot" "services/matrix-mana-bot/" "packages/matrix-bot-common/"
# Check if anything needs deploying
ANY="false"
for svc in matrix-web mana-core-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-backend clock-web contacts-backend contacts-web mukke-backend mukke-web matrix-mana-bot; do
for svc in matrix-web mana-core-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-backend clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web matrix-mana-bot; do
val=$(grep "^$svc=" $GITHUB_OUTPUT | tail -1 | cut -d= -f2)
if [ "$val" == "true" ]; then
ANY="true"
@ -210,6 +216,8 @@ jobs:
if [ "${{ needs.detect-changes.outputs.contacts-web }}" == "true" ]; then SERVICES="$SERVICES contacts-web"; fi
if [ "${{ needs.detect-changes.outputs.mukke-backend }}" == "true" ]; then SERVICES="$SERVICES mukke-backend"; fi
if [ "${{ needs.detect-changes.outputs.mukke-web }}" == "true" ]; then SERVICES="$SERVICES mukke-web"; fi
if [ "${{ needs.detect-changes.outputs.storage-backend }}" == "true" ]; then SERVICES="$SERVICES storage-backend"; fi
if [ "${{ needs.detect-changes.outputs.storage-web }}" == "true" ]; then SERVICES="$SERVICES storage-web"; fi
if [ "${{ needs.detect-changes.outputs.matrix-mana-bot }}" == "true" ]; then SERVICES="$SERVICES matrix-mana-bot"; fi
fi
@ -308,8 +316,10 @@ jobs:
clock-web) echo "http://localhost:5013/health" ;;
contacts-backend) echo "http://localhost:3034/health" ;;
contacts-web) echo "http://localhost:5014/health" ;;
mukke-backend) echo "http://localhost:3035/health" ;;
mukke-web) echo "http://localhost:5015/health" ;;
mukke-backend) echo "http://localhost:3010/health" ;;
mukke-web) echo "http://localhost:5180/health" ;;
storage-backend) echo "http://localhost:3035/api/v1/health" ;;
storage-web) echo "http://localhost:5015/health" ;;
*) echo "" ;;
esac
}
@ -319,7 +329,7 @@ jobs:
SERVICES="${{ steps.services.outputs.services }}"
if [ "$DEPLOY_ALL" == "true" ]; then
SERVICES="mana-auth matrix-web chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-backend clock-web contacts-backend contacts-web mukke-backend mukke-web"
SERVICES="mana-auth matrix-web chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-backend clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web"
fi
HEALTH_RESULTS=""

View file

@ -79,17 +79,9 @@ COPY --from=builder /app/apps/storage/apps/web/node_modules ./node_modules
COPY --from=builder /app/apps/storage/apps/web/build ./build
COPY --from=builder /app/apps/storage/apps/web/package.json ./
# Expose port
EXPOSE 5185
# Set environment variables
ENV NODE_ENV=production
ENV PORT=5185
ENV HOST=0.0.0.0
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:5185/health || exit 1
# Run the app
CMD ["node", "build"]

View file

@ -1446,7 +1446,13 @@ services:
start_period: 40s
storage-web:
image: ghcr.io/memo-2023/storage-web:latest
build:
context: .
dockerfile: apps/storage/apps/web/Dockerfile
args:
PUBLIC_BACKEND_URL: http://storage-backend:3035
PUBLIC_MANA_CORE_AUTH_URL: http://mana-auth:3001
image: storage-web:local
container_name: mana-app-storage-web
restart: always
depends_on: