#!/bin/bash # Build script for GoCheck container set -e IMAGE_NAME="gocheck" CONTAINER_NAME="gocheck-container" PORT="${PORT:-8080}" echo "��️ Building GoCheck frontend..." echo "🏗️ Building GoCheck container..." # Build the container image podman build -t $IMAGE_NAME -f Containerfile . echo "✅ Container built successfully!" echo "🚀 Starting GoCheck container on port $PORT..." podman run -d \ --rm \ --name $CONTAINER_NAME \ -p $PORT:8080 \ -e PORT=8080 \ -v gocheck-data:/app \ $IMAGE_NAME echo "✅ GoCheck is running!" echo "🌐 Access the application at: http://localhost:$PORT" echo "" echo "📋 Container management commands:" echo " View logs: podman logs $CONTAINER_NAME" echo " Stop: podman stop $CONTAINER_NAME" echo " Start: podman start $CONTAINER_NAME" echo " Remove: podman rm $CONTAINER_NAME" echo " Shell access: podman exec -it $CONTAINER_NAME /bin/sh" echo "" echo "🔧 Environment variables:" echo " PORT: Set to override the default port (default: 8080)"