Types of command to start an application using CodeDeploy

0

Hello, I'm using CodeDeploy and CodePipeline to deploy my back-end Python Flask application on an EC2 instance with Github connection. Usually, to start the app locally I will use this command in the terminal:

uwsgi --ini myapp:app_var_name

My problem is that when I do this, the step "Application start" in the CodeDeploy "deployment" stage runs infinitely, until a timeout error happens that stops the pipeline. I confirmed the fact that the application was launched by sending a request to the public address.

What kind of command line should I write to avoid any CodeDeploy stage to timeout? Does adding & to the command line enough?

RabahO
feita há 2 anos647 visualizações
1 Resposta
0

Your task for "Application Start" hook requires to be finished after it start the application service.

https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-server

For the uWSGI server that you use, it can be run through service manager like systemd. You should make the service to be stopped before the installation and start the service again after the deployment.

Please check following uWSGI document for more information.

https://uwsgi-docs.readthedocs.io/en/latest/Management.html

AWS
respondido há 2 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