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
posta 4 anni fa407 visualizzazioni
1 Risposta
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
con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande