-
Notifications
You must be signed in to change notification settings - Fork 33
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
Showing
3 changed files
with
89 additions
and
8 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
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,34 @@ | ||
@echo off | ||
:: Use environment variable for INSTALL_DIR if it exists, else use default | ||
IF NOT DEFINED INSTALL_DIR SET "INSTALL_DIR=%LocalAppData%\Programs\site-audit-seo" | ||
echo INSTALL_DIR: %INSTALL_DIR% | ||
|
||
:: Check if the install directory exists, create if it does not | ||
IF NOT EXIST "%INSTALL_DIR%" ( | ||
mkdir "%INSTALL_DIR%" | ||
) | ||
|
||
:: Clone the repository (Ensure you have git command available) | ||
pushd "%INSTALL_DIR%" | ||
IF EXIST ".git" ( | ||
echo Repository already cloned, updating... | ||
git pull | ||
) ELSE ( | ||
git clone /~https://github.com/viasite/site-audit-seo.git "%INSTALL_DIR%" | ||
) | ||
|
||
:: Assuming docker-compose.yml is at the root of the cloned directory | ||
:: Start Docker Compose | ||
docker compose pull | ||
docker compose up -d | ||
|
||
:: Follow the logs | ||
docker compose logs -tf | ||
|
||
popd | ||
|
||
echo. | ||
echo site-audit-seo will remain running in the background. | ||
echo To stop the service, run: | ||
echo cd "%INSTALL_DIR%" | ||
echo docker compose down |
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,34 @@ | ||
#!/bin/bash | ||
|
||
# Use environment variable for INSTALL_DIR if it exists, else use default | ||
INSTALL_DIR=${INSTALL_DIR:-"$HOME/.local/share/programs/site-audit-seo"} | ||
echo "INSTALL_DIR: $INSTALL_DIR" | ||
|
||
# Check if the install directory exists, create if it does not | ||
if [ ! -d "$INSTALL_DIR" ]; then | ||
mkdir -p "$INSTALL_DIR" | ||
fi | ||
|
||
# Clone the repository (Ensure you have git command available) | ||
cd "$INSTALL_DIR" | ||
if [ ! -d ".git" ]; then | ||
git clone /~https://github.com/viasite/site-audit-seo.git "$INSTALL_DIR" | ||
else | ||
echo "Repository already cloned, updating..." | ||
git pull | ||
fi | ||
|
||
# Assuming docker-compose.yml is at the root of the cloned directory | ||
# Start Docker Compose | ||
docker compose pull | ||
docker compose up -d | ||
|
||
# Follow the logs | ||
docker compose logs -tf | ||
|
||
echo "" | ||
echo "site-audit-seo will remain running in the background." | ||
echo "To stop the service, run: | ||
cd \"$INSTALL_DIR\" | ||
docker compose down | ||
" |