-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdestroy.sh
More file actions
executable file
·28 lines (22 loc) · 811 Bytes
/
destroy.sh
File metadata and controls
executable file
·28 lines (22 loc) · 811 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
#!/usr/bin/env bash
{
set -e
source ./.env
# Bring down the docker services and destroy the volumes
echo "Bringing down docker compose services..."
docker compose down --remove-orphans --volumes --remove-orphans
# Remove the installed dependencies
echo "Removing node_modules/ and vendor/ directories..."
rm -rf "$PM_APP_SOURCE/node_modules"
rm -rf "$PM_APP_SOURCE/vendor"
rm "$PM_APP_SOURCE/.env"
# Restore the public directory and composer files
echo "Restoring processmaker/processmaker back to git commit HEAD..."
# Restore the rest of the app source dir...
cd "$PM_APP_SOURCE" && git restore . && \
cd "$PM_APP_SOURCE" && git restore --staged . && \
cd "$PM_APP_SOURCE" && git clean -f -x && \
cd "$PM_BUILD_SOURCE"
# exit when complete
echo "Done!" && exit 0
}