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
preguntada hace 2 años647 visualizaciones
1 Respuesta
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 hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas