简体   繁体   English

在 AWS CodeDeploy 上为 django runserver 命令运行新的 shell 进程

[英]Run a new shell process for django runserver command on AWS CodeDeploy

I have an AWS CodeDeploy script for bootstrapping/running a Django instance.我有一个用于引导/运行 Django 实例的 AWS CodeDeploy 脚本。 However I reach a problem in that the python manage.py runserver command consumes the current shell process, so the CodeDeploy script never technically completes.但是我遇到了一个问题,即python manage.py runserver命令消耗了当前的 shell 进程,因此 CodeDeploy 脚本在技术上从未完成。

Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

How would one run this command in a way that doesn't block the shell script?如何以不阻止 shell 脚本的方式运行此命令? I have tried appending the command with an & to no avail.我试过用&附加命令无济于事。

I ended up using screen:我最终使用了屏幕:

screen -d -m python manage.py runserver

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM