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
질문됨 2년 전647회 조회
1개 답변
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
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠