fix production storfront and homepage
Build & Deploy / Build & Push Docker Image (push) Successful in 2m45s
Test / Type Check (all packages) (push) Successful in 53s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 47s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Successful in 43s
Test / Admin Unit Tests (push) Successful in 41s
Test / Dashboard Unit Tests (push) Successful in 41s
Test / API Integration Tests (push) Successful in 1m0s

This commit is contained in:
root
2026-07-01 09:02:31 -04:00
parent 9703de974a
commit 184a4bac8b
8 changed files with 73 additions and 10 deletions
+22 -1
View File
@@ -209,6 +209,7 @@ pull_prod_release_images() {
require_release_image
if load_release_image_archives; then
verify_prod_release_image
return 0
fi
@@ -219,7 +220,27 @@ pull_prod_release_images() {
exit 1
fi
prod_compose pull migrate api storefront dashboard admin
prod_compose pull migrate api homepage storefront dashboard admin
verify_prod_release_image
}
verify_prod_release_image() {
require_release_image
local image="${APP_IMAGE:-rentaldrivego/carmanagement}:${IMAGE_TAG}"
echo "Verifying production image contents: ${image}"
if ! docker image inspect "${image}" >/dev/null 2>&1; then
echo "Production image is not available locally after load/pull: ${image}" >&2
exit 1
fi
if ! docker run --rm --entrypoint sh "${image}" -c 'test -f /app/config/nextSecurityHeaders.js' >/dev/null 2>&1; then
echo "Production image is missing /app/config/nextSecurityHeaders.js: ${image}" >&2
echo "This image cannot start the Next.js apps because their next.config.js files require ../../config/nextSecurityHeaders." >&2
echo "Build and transfer a fresh image from the full repository, then rerun deployment." >&2
exit 1
fi
}
load_release_image_archives() {
+2 -1
View File
@@ -26,8 +26,9 @@ echo "Running database migrations"
run_prod_migrations
echo "Starting application services"
prod_compose up -d api storefront dashboard admin
prod_compose up -d api homepage storefront dashboard admin
wait_for_healthy api 180
wait_for_healthy homepage 180
wait_for_healthy storefront 180
wait_for_healthy dashboard 180
wait_for_healthy admin 180
+1 -1
View File
@@ -44,7 +44,7 @@ SKIP_RAW_RESTORE_VOLUMES=(
)
echo "Stopping application services before restore..."
prod_compose stop api storefront dashboard admin pgmanage >/dev/null || true
prod_compose stop api homepage storefront dashboard admin pgmanage >/dev/null || true
prod_compose stop redis >/dev/null || true
stop_traefik
@@ -90,7 +90,7 @@ echo "Applying migrations"
prod_compose run --rm migrate
echo "Starting application services"
app_services=(api storefront dashboard admin)
app_services=(api homepage storefront dashboard admin)
if [[ "${INCLUDE_PGMANAGE}" == "1" ]]; then
prod_compose --profile private-tools up -d "${app_services[@]}" pgmanage
@@ -98,6 +98,7 @@ else
prod_compose up -d "${app_services[@]}"
fi
wait_for_healthy api 180
wait_for_healthy homepage 180
wait_for_healthy storefront 180
wait_for_healthy dashboard 180
wait_for_healthy admin 180
+3 -2
View File
@@ -6,10 +6,11 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
source "${ROOT_DIR}/scripts/docker-prod-common.sh"
start_traefik
start_prod_services postgres redis api storefront dashboard admin
start_prod_services postgres redis api homepage storefront dashboard admin
wait_for_healthy api
wait_for_healthy homepage
wait_for_healthy storefront
wait_for_healthy dashboard
wait_for_healthy admin
echo "Production stack is up and healthy: traefik, postgres, redis, api, storefront, dashboard, admin"
echo "Production stack is up and healthy: traefik, postgres, redis, api, homepage, storefront, dashboard, admin"