diff --git a/.platform/hooks/postdeploy/01_log_create_directory.sh b/.platform/hooks/postdeploy/01_log_create_directory.sh new file mode 100755 index 0000000000..6525dae464 --- /dev/null +++ b/.platform/hooks/postdeploy/01_log_create_directory.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Only run on the leader instance +if [ "$EB_IS_COMMAND_LEADER" == "true" ]; then + echo "Preparing a new directory for Django logs..." + docker exec -t $(docker ps -a -q | head -n 1) mkdir -p /var/app/log +fi \ No newline at end of file diff --git a/.platform/hooks/postdeploy/02_log_change_permissions.sh b/.platform/hooks/postdeploy/02_log_change_permissions.sh new file mode 100755 index 0000000000..978f4bade9 --- /dev/null +++ b/.platform/hooks/postdeploy/02_log_change_permissions.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Only run on the leader instance +if [ "$EB_IS_COMMAND_LEADER" == "true" ]; then + echo "Changing permissions on the Django logs directory..." + docker exec -t $(docker ps -a -q | head -n 1) chmod g+s /var/app/log +fi \ No newline at end of file diff --git a/.platform/hooks/postdeploy/01_compile_messages.sh b/.platform/hooks/postdeploy/05_compile_messages.sh similarity index 100% rename from .platform/hooks/postdeploy/01_compile_messages.sh rename to .platform/hooks/postdeploy/05_compile_messages.sh diff --git a/.platform/hooks/postdeploy/02_collect_static.sh b/.platform/hooks/postdeploy/06_collect_static.sh similarity index 100% rename from .platform/hooks/postdeploy/02_collect_static.sh rename to .platform/hooks/postdeploy/06_collect_static.sh diff --git a/.platform/hooks/postdeploy/03_migrate.sh b/.platform/hooks/postdeploy/07_migrate.sh similarity index 100% rename from .platform/hooks/postdeploy/03_migrate.sh rename to .platform/hooks/postdeploy/07_migrate.sh diff --git a/.platform/hooks/postdeploy/04_create_cache_table.sh b/.platform/hooks/postdeploy/08_create_cache_table.sh similarity index 100% rename from .platform/hooks/postdeploy/04_create_cache_table.sh rename to .platform/hooks/postdeploy/08_create_cache_table.sh