Something went wrong. Try again.
Something went wrong. Try again.
1.6 kB · 32 lines
Shell
at main
123456789101112131415161718192021222324252627282930313233#!/usr/bin/env bash# Runs on the server, from the unpacked package: makes its images available to the local docker.# Afterwards `docker compose up -d` (with your .env next to compose.yml) starts, or updates to, this version.# Run it as the same user (and against the same docker) as `docker compose`: images are per docker daemon.set -euo pipefail
bundle="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"version="$(cat "$bundle/VERSION")"
docker load -i "$bundle/images.tar.gz"
# Only in a package made with --with-jikan: the images of the self-hosted Jikan (jikan.compose.yml).if [ -f "$bundle/jikan-images.tar.gz" ]; then docker load -i "$bundle/jikan-images.tar.gz" echo "The images of the self-hosted Jikan are loaded: docker compose -f compose.yml -f jikan.compose.yml up -d"fi
# Only in a package made with --with-anime-seasons: the image of the Anime Seasons feed service.if [ -f "$bundle/anime-seasons-image.tar.gz" ]; then docker load -i "$bundle/anime-seasons-image.tar.gz" echo "The Anime Seasons feed service is loaded: docker compose -f compose.yml -f anime-seasons.compose.yml up -d"fi
for image in mediatracker-api:latest mediatracker-web:latest postgres:18-alpine ghcr.io/bluesky-social/indigo/tap:latest; do if ! docker image inspect "$image" > /dev/null 2>&1; then echo "Image $image is missing after loading the package." >&2 exit 1 fidone
echo "Loaded version $version (tagged latest, docker context: $(docker context show 2>/dev/null || echo default))."echo "Start it with: docker compose up -d (the first time after copying .env.example to .env and adjusting it)"