blumeops/containers/cv/start.sh
Erich Blume 5e6fc79921 Add CV/resume web app at cv.ops.eblu.me
Container (nginx:alpine), k8s manifests, ArgoCD app, Caddy route, and
deploy workflow. Content is built and released from the separate cv repo
(forge.ops.eblu.me/eblume/cv).

Also removes unnecessary sh -c wrapper around tar in build_docs Dagger
function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:03:33 -08:00

31 lines
776 B
Bash

#!/bin/sh
set -e
HTML_DIR="/usr/share/nginx/html"
# Check for required environment variable
if [ -z "$CV_RELEASE_URL" ]; then
echo "Error: CV_RELEASE_URL environment variable is required"
echo "Set it to the URL of the CV content tarball to serve"
exit 1
fi
echo "Downloading CV content from: $CV_RELEASE_URL"
# Download the tarball
if ! curl -fsSL "$CV_RELEASE_URL" -o /tmp/cv.tar.gz; then
echo "Error: Failed to download CV content from $CV_RELEASE_URL"
exit 1
fi
# Clear existing content and extract
rm -rf "${HTML_DIR:?}"/*
echo "Extracting CV content to $HTML_DIR"
tar -xzf /tmp/cv.tar.gz -C "$HTML_DIR"
rm /tmp/cv.tar.gz
echo "CV content extracted successfully"
echo "Starting nginx..."
# Start nginx in foreground
exec nginx -g "daemon off;"