feat: container management tools in tools/
Shell scripts for build, start, stop, restart, nuke, logs, status. Shared helpers in _common.sh (colours, compose detection, project root). Updated CHEATSHEET.md with new tool references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
tools/start
Executable file
23
tools/start
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Start the derp container.
|
||||
# Usage: tools/start
|
||||
|
||||
# shellcheck source=tools/_common.sh
|
||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/_common.sh"
|
||||
cd "$PROJECT_DIR" || exit 1
|
||||
|
||||
# Build first if no image exists
|
||||
if ! podman image exists "$IMAGE_NAME" 2>/dev/null; then
|
||||
dim "No image found, building..."
|
||||
"$SCRIPT_DIR/build"
|
||||
echo
|
||||
fi
|
||||
|
||||
dim "Starting container..."
|
||||
$COMPOSE up -d
|
||||
|
||||
sleep 3
|
||||
dim "Recent logs:"
|
||||
podman logs --tail 15 "$CONTAINER_NAME" 2>&1 || true
|
||||
echo
|
||||
info "Container started"
|
||||
Reference in New Issue
Block a user