feat: complete MongoDB to CouchDB migration and deployment

- Remove all mongoose dependencies from backend
- Convert Badge and PointTransaction models to CouchDB
- Fix gamificationService for CouchDB architecture
- Update Docker registry URLs to use HTTPS (port 443)
- Fix ingress configuration for HAProxy
- Successfully deploy multi-architecture images
- Application fully running on Kubernetes with CouchDB

🤖 Generated with [AI Assistant]

Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
William Valentin
2025-11-02 14:39:49 -08:00
parent dff42f3766
commit 5efee88655
14 changed files with 603 additions and 10547 deletions

View File

@@ -6,7 +6,7 @@
set -e
# Configuration
REGISTRY="gitea-http.taildb3494.ts.net:3000/will/adopt-a-street"
REGISTRY="gitea-http.taildb3494.ts.net/will/adopt-a-street"
BACKEND_IMAGE="${REGISTRY}/backend"
FRONTEND_IMAGE="${REGISTRY}/frontend"
VERSION=${1:-latest}
@@ -26,7 +26,7 @@ echo ""
inspect_image() {
local image_name=$1
local image_tag=$2
echo -e "${YELLOW}📋 Inspecting ${image_name} manifest...${NC}"
docker buildx imagetools inspect "${image_name}:${image_tag}"
echo ""
@@ -37,12 +37,12 @@ test_platform_pull() {
local image_name=$1
local platform=$2
local temp_container="test-$(echo $image_name | tr '/' '-')-${platform//[^a-zA-Z0-9]/}"
echo -e "${YELLOW}🧪 Testing ${image_name} pull for ${platform}...${NC}"
# Pull image for specific platform
docker pull --platform "${platform}" "${image_name}:${VERSION}"
# Create and run a test container
if [[ "$image_name" == *"backend"* ]]; then
# Test backend - check if it starts
@@ -50,7 +50,7 @@ test_platform_pull() {
-p 5001:5000 \
-e NODE_ENV=test \
"${image_name}:${VERSION}"
# Wait a moment and check if container is running
sleep 5
if docker ps | grep -q "${temp_container}"; then
@@ -64,7 +64,7 @@ test_platform_pull() {
docker run --rm --platform "${platform}" --name "${temp_container}" -d \
-p 8080:80 \
"${image_name}:${VERSION}"
# Wait a moment and check if container is running
sleep 5
if docker ps | grep -q "${temp_container}"; then
@@ -74,7 +74,7 @@ test_platform_pull() {
echo -e "${RED}❌ Frontend container failed to start on ${platform}${NC}"
fi
fi
# Clean up
docker rmi "${image_name}:${VERSION}" >/dev/null 2>&1 || true
echo ""
@@ -125,4 +125,4 @@ echo " ✅ Images can be pulled and run on current platform"
echo ""
echo -e "${BLUE}To test on other platforms, run this script on:${NC}"
echo " - AMD64 (x86_64) machine for linux/amd64 testing"
echo " - ARM64 (aarch64) machine for linux/arm64 testing"
echo " - ARM64 (aarch64) machine for linux/arm64 testing"