Stops the container, removes the stale node_modules volume, and rebuilds the image. Run this after adding or updating npm dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
622 B
Bash
Executable File
22 lines
622 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Rebuilds the frontend Docker container and refreshes the node_modules volume.
|
|
# Run this after adding or updating npm dependencies.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "Stopping frontend container..."
|
|
docker compose stop frontend
|
|
|
|
echo "Removing frontend container..."
|
|
docker compose rm -f frontend
|
|
|
|
echo "Removing stale node_modules volume..."
|
|
docker volume rm familienarchiv_frontend_node_modules 2>/dev/null || true
|
|
|
|
echo "Rebuilding image and starting container..."
|
|
docker compose up -d --build frontend
|
|
|
|
echo "Done. Tailing logs (Ctrl+C to exit)..."
|
|
docker compose logs -f frontend
|