use uwsgi/daphne/nginx for dev

This commit is contained in:
Wayne Witzel III 2016-10-14 01:43:14 -04:00
parent 7022edc646
commit 4220246400
5 changed files with 34 additions and 5 deletions

View File

@ -387,6 +387,24 @@ flower:
fi; \
$(PYTHON) manage.py celery flower --address=0.0.0.0 --port=5555 --broker=amqp://guest:guest@$(RABBITMQ_HOST):5672//
uwsgi:
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/tower/bin/activate; \
fi; \
uwsgi --socket :8050 --module=awx.wsgi:application --home=/venv/tower --chdir=/tower_devel/ --vacuum --processes=5 --harakiri=60 --static-map /static=/tower_devel/awx/public/static
daphne:
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/tower/bin/activate; \
fi; \
daphne -b 127.0.0.1 -p 8051 awx.asgi:channel_layer
runworker:
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/tower/bin/activate; \
fi; \
$(PYTHON) manage.py runworker --only-channels websocket.*
# Run the built-in development webserver (by default on http://localhost:8013).
runserver:
@if [ "$(VENV_BASE)" ]; then \
@ -753,7 +771,7 @@ docker-auth:
# Docker Compose Development environment
docker-compose: docker-auth
TAG=$(COMPOSE_TAG) docker-compose -f tools/docker-compose.yml up --no-recreate
TAG=$(COMPOSE_TAG) docker-compose -f tools/docker-compose.yml up --no-recreate nginx tower
docker-compose-cluster: docker-auth
TAG=$(COMPOSE_TAG) docker-compose -f tools/docker-compose-cluster.yml up

View File

@ -1,5 +1,7 @@
runserver: make runserver
runworker: make runworker
daphne: make daphne
celeryd: make celeryd
receiver: make receiver
factcacher: make factcacher
flower: make flower
uwsgi: make uwsgi

View File

@ -134,4 +134,5 @@ wsgiref==0.1.2
xmltodict==0.9.2
channels==0.17.2
asgi_amqp==0.3
uwsgi==2.0.14
daphne==0.15.0

View File

@ -11,8 +11,9 @@ services:
RABBITMQ_VHOST: /
ports:
- "8080:8080"
- "8013:8013"
- "5555:5555"
- "8050:8050"
- "8051:8051"
links:
- postgres
- memcached
@ -34,6 +35,13 @@ services:
ports:
- "15672:15672"
nginx:
image: gcr.io/ansible-tower-engineering/tower_nginx:${TAG}
ports:
- "8013:80"
links:
- tower
# Source Code Synchronization Container
# sync:
# build:

View File

@ -27,6 +27,6 @@ RUN ln -s /tower_devel/tools/docker-compose/start_development.sh /start_developm
WORKDIR /tmp
RUN SWIG_FEATURES="-cpperraswarn -includeall -D__`uname -m`__ -I/usr/include/openssl" VENV_BASE="/venv" make requirements_dev
WORKDIR /
EXPOSE 8013 8080 22
EXPOSE 8050 8051 8080 22
ENTRYPOINT ["/usr/bin/dumb-init"]
CMD /start_development.sh