Skip to main content
Glama
build-docker.sh•2.36 kB
#!/bin/bash # Docker build script for Christian Heritage Archive Server # This script builds the Docker image with proper tagging set -e echo "🐳 Building EGH Research Docker image..." # Default values IMAGE_NAME="egh-research-server" TAG="latest" REGISTRY="" # Parse command line arguments while [[ $# -gt 0 ]]; do case $1 in --tag|-t) TAG="$2" shift 2 ;; --registry|-r) REGISTRY="$2" shift 2 ;; --name|-n) IMAGE_NAME="$2" shift 2 ;; --help|-h) echo "Usage: $0 [OPTIONS]" echo "Options:" echo " --tag, -t TAG Docker image tag (default: latest)" echo " --registry, -r REG Docker registry (default: none)" echo " --name, -n NAME Image name (default: egh-research-server)" echo " --help, -h Show this help" exit 0 ;; *) echo "Unknown option $1" exit 1 ;; esac done # Construct full image name if [ -n "$REGISTRY" ]; then FULL_IMAGE_NAME="$REGISTRY/$IMAGE_NAME:$TAG" else FULL_IMAGE_NAME="$IMAGE_NAME:$TAG" fi echo "šŸ“‹ Build configuration:" echo " Image: $FULL_IMAGE_NAME" echo " Context: $(pwd)" # Check if database exists if [ ! -f "data/egw-writings.db" ]; then echo "āš ļø No database found at data/egw-writings.db" echo " The Docker build will create an empty database structure" fi # Check for ZIP files ZIP_COUNT=$(find data/ -name "*.zip" 2>/dev/null | wc -l) if [ "$ZIP_COUNT" -gt 0 ]; then echo "šŸ“¦ Found $ZIP_COUNT ZIP files for extraction" else echo "šŸ“‚ No ZIP files found - using existing database if available" fi # Build the image echo "šŸ”Ø Starting Docker build..." docker build \ --tag "$FULL_IMAGE_NAME" \ --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ --build-arg VCS_REF="$(git rev-parse --short HEAD 2>/dev/null || echo 'unknown')" \ . echo "āœ… Docker build completed successfully" echo "šŸš€ To run the container:" echo " docker run -p 3000:3000 $FULL_IMAGE_NAME" echo "" echo "šŸ“– Or use docker-compose:" echo " docker-compose up -d" # Optional: Push to registry if [ -n "$REGISTRY" ]; then read -p "šŸ¤” Push to registry $REGISTRY? (y/N): " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "šŸ“¤ Pushing to registry..." docker push "$FULL_IMAGE_NAME" echo "āœ… Push completed" fi fi

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pythondev-pro/egw_writings_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server