Files
container-census/scripts/run-local.sh
T
Self Hosters a3c7e6995f Release v1.7.1: Fix image update detection and add agent version display
Fixed:
- Image update detection now uses registry digest (RepoDigests) instead of
  local image ID, eliminating false positive updates for containers already
  running the latest image
- Multi-arch image timestamps now correctly fetched by resolving platform-
  specific manifest (linux/amd64) from manifest lists
- Logout button hidden when authentication is disabled
- JS files served with no-cache headers to ensure updates are seen without
  hard refresh

Added:
- Agent version display on Hosts page with version fetched on each scan
- Onboarding tour now re-shows on major/minor version upgrades to display
  "What's new" information to returning users

Changed:
- Update progress UI shows "Pulling image..." immediately when update starts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:11:37 -05:00

56 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# Create Trivy cache directory in /tmp for local development
mkdir -p /tmp/trivy-cache
# Prompt user for test mode
read -p "Run in test mode? (y/N): " -n 1 -r
echo # move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Running in TEST mode..."
CONFIG_FILE="config-test.yaml"
DB_FILE="census-test.db"
# Ask if user wants to reset the test database
read -p "Reset test database? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Resetting test database..."
rm -f /opt/docker-compose/census-server/census/config/config-test.yaml /opt/docker-compose/census-server/census/server/census-test.db
else
echo "Keeping existing test database..."
fi
else
echo "Running in NORMAL mode..."
CONFIG_FILE="config.yaml"
DB_FILE="census.db"
fi
# Prompt for authentication
read -p "Enable authentication? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Authentication ENABLED (username: qwerty, password: qwerty)"
AUTH_ENABLED=true
AUTH_USERNAME=qwerty
AUTH_PASSWORD=qwerty
SESSION_SECRET="local-dev-secret-$(date +%s)"
else
echo "Authentication DISABLED"
AUTH_ENABLED=false
AUTH_USERNAME=""
AUTH_PASSWORD=""
SESSION_SECRET=""
fi
# Run the server with local development settings
DOCKER_HOST="${DOCKER_HOST:-unix:///var/run/docker.sock}" \
SERVER_PORT=3333 \
CONFIG_PATH=/opt/docker-compose/census-server/census/config/${CONFIG_FILE} \
AUTH_ENABLED=${AUTH_ENABLED} \
AUTH_USERNAME=${AUTH_USERNAME} \
AUTH_PASSWORD=${AUTH_PASSWORD} \
SESSION_SECRET=${SESSION_SECRET} \
DATABASE_PATH=/opt/docker-compose/census-server/census/server/${DB_FILE} \
TRIVY_CACHE_DIR=/tmp/trivy-cache \
/tmp/census-server