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
posta 2 anni fa647 visualizzazioni
1 Risposta
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
con risposta 2 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