rybbit/restart.sh
Bill Yang abe819c411
Fix disable signup (#260)
* change scripts

* log env

* force rebuild

* wip

* Refactor signup and login components to use dynamic configuration for signup availability

- Replaced static DISABLE_SIGNUP constant with dynamic configuration fetched from useConfigs hook in both login and signup pages.
- Updated conditional rendering logic to handle loading state and configuration changes more effectively.
- Cleaned up unused environment variable logging in const.ts and added a new route for configuration retrieval in the server index.
2025-05-14 21:18:14 -07:00

30 lines
No EOL
742 B
Bash

#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
echo "Restarting services..."
# Stop all 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
# Load environment variables
source .env
# Start the appropriate services with updated environment variables
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 "Services restarted. You can monitor logs with: docker compose logs -f"