AL2 - predeploy script and environment variables

0

Hi,

I'm using a predeploy script (.platform/hooks/predeploy/) to run Django's collectstatic command to bundle up the static assets for my site. Works great. Except it appears to never run if I just update an environment variable either within the AWS console, or via the EB CLI. The environment variable is set, but it looks like my predeploy script is not run and my normally present /static folder with my static assets is not present.

This forces me to run another deploy (eb deploy), which then correctly runs my script. However it means that my website is basically down during the many minutes it takes for a) the environment to update with the new environment variable and b) the environment to update with the follow up deploy.

This is really not good. Any suggestions on how to solve for this? Much appreciated in advance!

jt6677
asked 3 years ago400 views
1 Answer
0

Replying to my own post in case it helps someone else.

Solution: copy the predeploy script in .platform/hooks/predeploy into .platform/confighooks/predeploy so that it is also run on configuration changes.

jt6677
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions