#!/usr/bin/env bash # Builds the API and web images and tags them with both the current git sha and # "latest" (the tag the deploy compose stack pulls). Both Dockerfiles are already # self-contained multi-stage builds (used directly by docker-compose.deploy.yml today), # so no separate CI-only Dockerfile variant is needed. set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh cd "$CI_ROOT" image_names log "Building $API_IMAGE:$GIT_SHA / :latest" docker build \ -f src/Novelly.Api/Dockerfile \ -t "$API_IMAGE:$GIT_SHA" \ -t "$API_IMAGE:latest" \ . log "Building $WEB_IMAGE:$GIT_SHA / :latest" docker build \ -f src/Novelly.Web/Dockerfile \ -t "$WEB_IMAGE:$GIT_SHA" \ -t "$WEB_IMAGE:latest" \ src/Novelly.Web log "docker-build.sh complete"