mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Remove notify app folder and installed python packages before we deploy the app
This commit is contained in:
@@ -4,6 +4,10 @@ files:
|
||||
destination: /home/notify-app/notifications-admin
|
||||
source: /
|
||||
hooks:
|
||||
BeforeInstall:
|
||||
- location: scripts/aws_clear_instance.sh
|
||||
runas: root
|
||||
timeout: 1000
|
||||
AfterInstall:
|
||||
-
|
||||
location: scripts/aws_install_dependencies.sh
|
||||
|
||||
14
scripts/aws_clear_instance.sh
Executable file
14
scripts/aws_clear_instance.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Removing application and dependencies"
|
||||
|
||||
if [ -d "/home/notify-app/notifications-admin" ]; then
|
||||
# Remove and re-create the directory
|
||||
rm -rf /home/notify-app/notifications-admin
|
||||
mkdir -vp /home/notify-app/notifications-admin
|
||||
# Remove installed py3 packages
|
||||
pip3 freeze | xargs pip3 uninstall -y
|
||||
else
|
||||
echo "Directory does not exist, something went wrong!"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user