-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
2c2b444
commit 1ae3600
Showing
1 changed file
with
30 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,30 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# This script revert the fresh start script to git branch | ||
# | ||
# Source: https://github.com/evertramos/nginx-proxy-automation | ||
# | ||
|
||
# Get the script name and its real file path | ||
SCRIPT_PATH="$(dirname "$(readlink -f "$0")")" | ||
SCRIPT_NAME="${0##*/}" | ||
CURRENT_PATH=$(pwd) | ||
|
||
# Go to script path if not there | ||
cd "${SCRIPT_PATH}/../" | ||
|
||
# Stop compose | ||
export COMPOSE_INTERACTIVE_NO_CLI=1 | ||
docker compose down 2&> /dev/null || true | ||
|
||
# Remove newly created files/folder | ||
sudo rm -rf ./data .env docker-compose.yml.backup_* .env.backup_* .env | ||
|
||
# Restore docker-compose.yml | ||
git restore docker-compose.yml | ||
|
||
echo 'Repo restored!' | ||
|
||
exit 0 | ||
|