-
-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c811c69
commit 8c8cce8
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Check if Docker is installed, if not, install it | ||
command -v docker &>/dev/null || curl -fsSL https://get.docker.com | sh | ||
|
||
# Set the default tag if not provided | ||
TAG=${1:-latest} | ||
|
||
# Check if the 'hiddify-manager' folder exists | ||
if [ -d "hiddify-manager" ]; then | ||
echo 'Folder "hiddify-manager" already exists. Please change the directory to install with Docker.' | ||
exit 1 | ||
fi | ||
|
||
# Create the 'hiddify-manager' directory | ||
mkdir hiddify-manager | ||
cd hiddify-manager | ||
|
||
# Download the docker-compose.yml file | ||
wget https://raw.githubusercontent.com/hiddify/Hiddify-Manager/refs/heads/main/docker-compose.yml | ||
|
||
# Generate random passwords for MySQL and Redis | ||
mysqlpassword=$(openssl rand -base64 40) | ||
redispassword=$(openssl rand -base64 40) | ||
|
||
# Update docker-compose.yml with the specified tag and passwords | ||
sed -i "s/hiddify-manager:latest/hiddify-manager:$TAG" docker-compose.yml | ||
sed -i "s/REDIS_STRONG_PASS/$redispassword/g" docker-compose.yml | ||
sed -i "s/MYSQL_STRONG_PASS/$mysqlpassword/g" docker-compose.yml | ||
|
||
# Start the containers using Docker Compose | ||
docker compose up -d | ||
|
||
# Follow the logs from the containers | ||
docker compose logs -f |