mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
Merge pull request #1126 from alphagov/fix-clear-instance-before-deploy
Remove app and py3 packages on codedeploy-ment
This commit is contained in:
@@ -4,6 +4,10 @@ files:
|
|||||||
destination: /home/notify-app/notifications-admin
|
destination: /home/notify-app/notifications-admin
|
||||||
source: /
|
source: /
|
||||||
hooks:
|
hooks:
|
||||||
|
BeforeInstall:
|
||||||
|
- location: scripts/aws_clear_instance.sh
|
||||||
|
runas: root
|
||||||
|
timeout: 1000
|
||||||
AfterInstall:
|
AfterInstall:
|
||||||
-
|
-
|
||||||
location: scripts/aws_install_dependencies.sh
|
location: scripts/aws_install_dependencies.sh
|
||||||
|
|||||||
10
scripts/aws_clear_instance.sh
Executable file
10
scripts/aws_clear_instance.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/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 -p /home/notify-app/notifications-admin
|
||||||
|
fi
|
||||||
|
|
||||||
Reference in New Issue
Block a user