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
feita há 4 anos407 visualizações
1 Resposta
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
respondido há 3 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas