fix(deploy): change API host port 8003→8010, move image to video-accessibility repo

Port 8003 is occupied by infra-api-1 on optical-dev server.
Artifact Registry repo renamed from nexus to video-accessibility.
cloudbuild.yaml defaults _TAG to 'latest' for manual runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-04-29 22:02:14 +01:00
parent b3ace22009
commit 582f8ad2e8
3 changed files with 8 additions and 11 deletions

View file

@ -3,14 +3,15 @@
#
# Trigger: manual or on push to main
# Usage:
# gcloud builds submit --config cloudbuild.yaml .
# Manual: gcloud builds submit --config cloudbuild.yaml .
# With SHA: gcloud builds submit --config cloudbuild.yaml --substitutions _TAG=$(git rev-parse --short HEAD) .
# =============================================================================
substitutions:
_REGION: europe-west1
_REPO: nexus
_REPO: video-accessibility
_IMAGE: va-worker
_TAG: $COMMIT_SHA # replaced with actual SHA by Cloud Build; use "latest" for manual runs
_TAG: latest # overridden with $COMMIT_SHA by Cloud Build trigger; use 'latest' for manual runs
steps:
# ── Build Cloud Run worker image ──────────────────────────────────────────
@ -22,17 +23,14 @@ steps:
- backend/Dockerfile.cloudrun
- -t
- ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:${_TAG}
- -t
- ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:latest
- backend/
# ── Push both tags ────────────────────────────────────────────────────────
# ── Push image ────────────────────────────────────────────────────────────
- name: gcr.io/cloud-builders/docker
id: push-va-worker
args:
- push
- --all-tags
- ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}
- ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:${_TAG}
# ── Update Cloud Run Job to use new image ─────────────────────────────────
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
@ -50,7 +48,6 @@ steps:
images:
- ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:${_TAG}
- ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:latest
options:
logging: CLOUD_LOGGING_ONLY

View file

@ -83,7 +83,7 @@ services:
redis:
condition: service_healthy
ports:
- "8003:8000"
- "8010:8000"
environment:
# App configuration
APP_ENV: ${APP_ENV:-dev}

View file

@ -19,7 +19,7 @@ WEBROOT="/var/www/html/video-accessibility"
APACHE_CONF_DIR="/etc/apache2/sites-available"
APACHE_VHOST="optical-dev.oliver.solutions.conf"
COMPOSE="docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.optical-dev.yml --env-file .env.production"
API_INTERNAL_PORT=8000 # host port the api container exposes
API_INTERNAL_PORT=8010 # host port the api container exposes
VITE_BASE="/video-accessibility"
# Only build images that run on optical-dev; heavy workers run on Cloud Run Jobs