forked from rybbit-io/rybbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrestart.sh
More file actions
30 lines (23 loc) · 766 Bytes
/
restart.sh
File metadata and controls
30 lines (23 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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 --force-recreate
else
# Start all services including caddy
docker compose --profile with-webserver up -d --force-recreate
fi
echo "Services restarted. You can monitor logs with: docker compose logs -f"