Archipelago — open-source initial import
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Build the podsteadr container image from the podsteadr repo.
|
||||
# Usage: ./build-from-prototype.sh [path-to-podsteadr-repo]
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DEFAULT_REPO="$HOME/podsteadr"
|
||||
REPO_DIR="${1:-$DEFAULT_REPO}"
|
||||
IMAGE_TAG="localhost/podsteadr:1.0.0"
|
||||
|
||||
if [ ! -d "$REPO_DIR" ]; then
|
||||
echo "podsteadr repo not found at: $REPO_DIR"
|
||||
echo " Set path: $0 /path/to/podsteadr"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$REPO_DIR/server/package.json" ] || [ ! -f "$REPO_DIR/frontend/package.json" ]; then
|
||||
echo "No server/package.json or frontend/package.json found in $REPO_DIR — is this the right directory?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine container runtime
|
||||
RUNTIME="podman"
|
||||
if ! command -v podman >/dev/null 2>&1; then
|
||||
RUNTIME="docker"
|
||||
fi
|
||||
|
||||
echo "Building podsteadr from $REPO_DIR using $SCRIPT_DIR/Dockerfile"
|
||||
$RUNTIME build -t "$IMAGE_TAG" -f "$SCRIPT_DIR/Dockerfile" "$REPO_DIR"
|
||||
|
||||
echo "Built $IMAGE_TAG"
|
||||
echo ""
|
||||
echo "You can now install podsteadr from the App Store in Archipelago."
|
||||
echo "Or run directly: $RUNTIME run -d --name podsteadr-app -p 8095:8095 $IMAGE_TAG"
|
||||
Reference in New Issue
Block a user