mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Merge pull request #3855 from ryanpetrello/improved-dev-code-reload
remove honcho in the dev environment (just use foregrounded supervisor) Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
12
Makefile
12
Makefile
@@ -269,15 +269,7 @@ supervisor:
|
|||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
. $(VENV_BASE)/awx/bin/activate; \
|
||||||
fi; \
|
fi; \
|
||||||
supervisord --pidfile=/tmp/supervisor_pid
|
supervisord --pidfile=/tmp/supervisor_pid -n
|
||||||
|
|
||||||
# Alternate approach to tmux to run all development tasks specified in
|
|
||||||
# Procfile.
|
|
||||||
honcho:
|
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
|
||||||
fi; \
|
|
||||||
honcho start -f tools/docker-compose/Procfile
|
|
||||||
|
|
||||||
collectstatic:
|
collectstatic:
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
@@ -289,7 +281,7 @@ uwsgi: collectstatic
|
|||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
. $(VENV_BASE)/awx/bin/activate; \
|
||||||
fi; \
|
fi; \
|
||||||
uwsgi -b 32768 --socket 127.0.0.1:8050 --module=awx.wsgi:application --home=/venv/awx --chdir=/awx_devel/ --vacuum --processes=5 --harakiri=120 --master --no-orphans --py-autoreload 1 --max-requests=1000 --stats /tmp/stats.socket --lazy-apps --logformat "%(addr) %(method) %(uri) - %(proto) %(status)" --hook-accepting1="exec:awx-manage run_dispatcher --reload"
|
uwsgi -b 32768 --socket 127.0.0.1:8050 --module=awx.wsgi:application --home=/venv/awx --chdir=/awx_devel/ --vacuum --processes=5 --harakiri=120 --master --no-orphans --py-autoreload 1 --max-requests=1000 --stats /tmp/stats.socket --lazy-apps --logformat "%(addr) %(method) %(uri) - %(proto) %(status)" --hook-accepting1="exec:supervisorctl restart tower-processes:awx-dispatcher tower-processes:awx-receiver"
|
||||||
|
|
||||||
daphne:
|
daphne:
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
|
|||||||
@@ -64,4 +64,3 @@ by the *daphne* server and our *asgi_amqp* implementation to broadcast messages
|
|||||||
|
|
||||||
### Development
|
### Development
|
||||||
- nginx listens on 8013/8043 instead of 80/443
|
- nginx listens on 8013/8043 instead of 80/443
|
||||||
- uwsgi, daphne, and runworker are started with honcho instead of supervisord
|
|
||||||
|
|||||||
@@ -27,9 +27,4 @@ mkdir -p /awx_devel/awx/public/static
|
|||||||
mkdir -p /awx_devel/awx/ui/static
|
mkdir -p /awx_devel/awx/ui/static
|
||||||
|
|
||||||
cd /awx_devel
|
cd /awx_devel
|
||||||
# Start the services
|
make supervisor
|
||||||
if [ -f "/awx_devel/tools/docker-compose/use_dev_supervisor.txt" ]; then
|
|
||||||
make supervisor
|
|
||||||
else
|
|
||||||
honcho start -f "tools/docker-compose/Procfile"
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ RUN python3 -m ensurepip
|
|||||||
RUN pip3 install virtualenv
|
RUN pip3 install virtualenv
|
||||||
RUN /usr/bin/ssh-keygen -q -t rsa -N "" -f /root/.ssh/id_rsa
|
RUN /usr/bin/ssh-keygen -q -t rsa -N "" -f /root/.ssh/id_rsa
|
||||||
RUN mkdir -p /data/db
|
RUN mkdir -p /data/db
|
||||||
RUN pip3 install honcho && pip install supervisor
|
RUN pip install supervisor
|
||||||
|
|
||||||
ADD requirements/requirements.txt \
|
ADD requirements/requirements.txt \
|
||||||
requirements/requirements_git.txt \
|
requirements/requirements_git.txt \
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
nginx: make nginx
|
|
||||||
runworker: make runworker
|
|
||||||
daphne: make daphne
|
|
||||||
dispatcher: make dispatcher
|
|
||||||
receiver: make receiver
|
|
||||||
uwsgi: make uwsgi
|
|
||||||
jupyter: make jupyter
|
|
||||||
@@ -5,9 +5,4 @@ set +x
|
|||||||
|
|
||||||
cd /awx_devel
|
cd /awx_devel
|
||||||
# Start the services
|
# Start the services
|
||||||
if [ -f "/awx_devel/tools/docker-compose/use_dev_supervisor.txt" ]; then
|
make supervisor
|
||||||
make supervisor
|
|
||||||
else
|
|
||||||
export PYTHONIOENCODING=utf_8
|
|
||||||
honcho start -f "tools/docker-compose/Procfile"
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ command = make uwsgi
|
|||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
|
stopwaitsecs = 1
|
||||||
|
stopsignal=KILL
|
||||||
|
stopasgroup=true
|
||||||
|
killasgroup=true
|
||||||
stdout_logfile=/dev/fd/1
|
stdout_logfile=/dev/fd/1
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user