-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#82] adding EB post deployment scripts
- Loading branch information
Showing
3 changed files
with
37 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,5 @@ | ||
option_settings: | ||
aws:elasticbeanstalk:container:python: | ||
WSGIPath: src.odm2cvs.odm2cvs.wsgi:application | ||
aws:elasticbeanstalk:environment:proxy:staticfiles: | ||
/static: src/odm2cvs/staticfiles |
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,18 @@ | ||
#!/bin/bash | ||
|
||
source "$PYTHONPATH/activate" && { | ||
|
||
if [[ $EB_IS_COMMAND_LEADER == "true" ]]; | ||
then | ||
cd /var/app/current/src/odm2cvs || exit 1; | ||
echo "Listing migrations before running migrate command:"; | ||
python manage.py showmigrations; | ||
echo "Running migrate command:"; | ||
python manage.py migrate --noinput; | ||
echo "Listing migrations after running migrate command:"; | ||
python manage.py showmigrations; | ||
else | ||
echo "Skipping migrations on non-leader node."; | ||
fi | ||
|
||
} |
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,14 @@ | ||
#!/bin/bash | ||
|
||
source "$PYTHONPATH/activate" && { | ||
|
||
if [[ $EB_IS_COMMAND_LEADER == "true" ]]; | ||
then | ||
cd /var/app/current/src/odm2cvs || exit 1; | ||
echo "Collecting static files:"; | ||
python manage.py collectstatic --noinput; | ||
else | ||
echo "Skipping static collection on non-leader node."; | ||
fi | ||
|
||
} |