mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 11:46:36 +08:00
Update deployment docs and media library UI
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE="${IMAGE:-ghcr.io/shukebta/mediastation-go}"
|
||||
TAG="${TAG:-latest}"
|
||||
PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64}"
|
||||
PUSH="${PUSH:-1}"
|
||||
BUILDER="${BUILDER:-mediastation-builder}"
|
||||
|
||||
if ! docker buildx inspect "$BUILDER" >/dev/null 2>&1; then
|
||||
docker buildx create --name "$BUILDER" --use >/dev/null
|
||||
else
|
||||
docker buildx use "$BUILDER" >/dev/null
|
||||
fi
|
||||
|
||||
args=(
|
||||
buildx build
|
||||
--platform "$PLATFORMS"
|
||||
-t "$IMAGE:$TAG"
|
||||
)
|
||||
|
||||
if [[ "$PUSH" == "1" ]]; then
|
||||
args+=(--push)
|
||||
else
|
||||
args+=(--load)
|
||||
fi
|
||||
|
||||
args+=(.)
|
||||
|
||||
echo "Building $IMAGE:$TAG for $PLATFORMS"
|
||||
docker "${args[@]}"
|
||||
Reference in New Issue
Block a user