mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-11 04:15:36 +02:00
- Removed the `--build` flag from `docker compose up` commands in both `setup.sh` and `update.sh` to streamline service startup. - Deleted the `self-hosting-upgrading.mdx` documentation file as it was deemed unnecessary. - Updated the title in `self-hosting.mdx` for clarity, changing it from "Setup" to "Self Hosting Guide".
38 lines
No EOL
942 B
Bash
38 lines
No EOL
942 B
Bash
#!/bin/bash
|
|
|
|
# Exit immediately if a command exits with a non-zero status.
|
|
set -e
|
|
|
|
echo "Updating to the latest version..."
|
|
|
|
# Pull latest changes from git repository
|
|
echo "Pulling latest code..."
|
|
git pull
|
|
|
|
# Stop running containers
|
|
echo "Stopping current services..."
|
|
docker compose down
|
|
|
|
# Check if .env file exists
|
|
if [ ! -f .env ]; then
|
|
echo "Error: .env file not found. Please run setup.sh first."
|
|
echo "Usage: ./setup.sh <domain_name>"
|
|
exit 1
|
|
fi
|
|
|
|
# Rebuild and start containers
|
|
echo "Rebuilding and starting updated services..."
|
|
|
|
# Load environment variables
|
|
source .env
|
|
|
|
if [ "$USE_WEBSERVER" = "false" ]; then
|
|
# Start without the caddy service when using --no-webserver
|
|
docker compose up -d backend client clickhouse postgres
|
|
else
|
|
# Start all services including caddy
|
|
docker compose up -d
|
|
fi
|
|
|
|
echo "Update complete. Services are running with the latest version."
|
|
echo "You can monitor logs with: docker compose logs -f" |