cheekylist/build-container.sh
2025-07-22 00:00:34 +02:00

40 lines
No EOL
1.1 KiB
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Build script for GoCheck container
set -e
IMAGE_NAME="gocheck"
CONTAINER_NAME="gocheck-container"
PORT="${PORT:-8080}"
echo "<22><> 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)"