summaryrefslogtreecommitdiffstats
path: root/tools/docker-compose
diff options
context:
space:
mode:
authorAlanCoding <arominge@redhat.com>2017-02-12 22:13:15 +0100
committerAlanCoding <arominge@redhat.com>2017-02-13 23:36:34 +0100
commitd1a71fb7bee5e9b26f9af53f07d490b415159aac (patch)
tree43f45adb33dcf63375bebaa2311a02bdb4259e1d /tools/docker-compose
parentMerge pull request #5329 from AlanCoding/disable_sig_jobs (diff)
downloadawx-d1a71fb7bee5e9b26f9af53f07d490b415159aac.tar.xz
awx-d1a71fb7bee5e9b26f9af53f07d490b415159aac.zip
add supervisor option to development environment
Diffstat (limited to 'tools/docker-compose')
-rw-r--r--tools/docker-compose/Dockerfile1
-rwxr-xr-xtools/docker-compose/start_development.sh8
-rw-r--r--tools/docker-compose/supervisor.conf73
3 files changed, 81 insertions, 1 deletions
diff --git a/tools/docker-compose/Dockerfile b/tools/docker-compose/Dockerfile
index 19b699ab36..4a78226a3a 100644
--- a/tools/docker-compose/Dockerfile
+++ b/tools/docker-compose/Dockerfile
@@ -19,6 +19,7 @@ RUN mkdir -p /etc/tower
RUN mkdir -p /data/db
ADD tools/docker-compose/license /etc/tower/license
RUN pip2 install honcho
+RUN pip2 install supervisor
RUN curl -LO https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && chmod +x ./dumb-init_1.1.3_amd64 && mv ./dumb-init_1.1.3_amd64 /usr/bin/dumb-init
ADD tools/docker-compose/ansible-tower.egg-link /tmp/ansible-tower.egg-link
ADD tools/docker-compose/tower-manage /usr/local/bin/tower-manage
diff --git a/tools/docker-compose/start_development.sh b/tools/docker-compose/start_development.sh
index ee94888431..9814a9344c 100755
--- a/tools/docker-compose/start_development.sh
+++ b/tools/docker-compose/start_development.sh
@@ -25,6 +25,7 @@ fi
cp -nR /tmp/ansible_tower.egg-info /tower_devel/ || true
cp /tmp/ansible-tower.egg-link /venv/tower/lib/python2.7/site-packages/ansible-tower.egg-link
+yes | cp -rf /tower_devel/tools/docker-compose/supervisor.conf /supervisor.conf
# Tower bootstrapping
make version_file
@@ -35,4 +36,9 @@ mkdir -p /tower_devel/awx/public/static
mkdir -p /tower_devel/awx/ui/static
# Start the service
-make honcho
+
+if [ -f "/tower_devel/tools/docker-compose/use_dev_supervisor.txt" ]; then
+ make supervisor
+else
+ make honcho
+fi
diff --git a/tools/docker-compose/supervisor.conf b/tools/docker-compose/supervisor.conf
new file mode 100644
index 0000000000..787720fec3
--- /dev/null
+++ b/tools/docker-compose/supervisor.conf
@@ -0,0 +1,73 @@
+[supervisord]
+umask = 022
+minfds = 4096
+nodaemon=true
+
+[program:celeryd]
+command = make celeryd
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:receiver]
+command = make receiver
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:runworker]
+command = make runworker
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:uwsgi]
+command = make uwsgi
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:daphne]
+command = make daphne
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:factcacher]
+command = make factcacher
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:nginx]
+command = make nginx
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[program:flower]
+command = make flower
+autostart = true
+autorestart = true
+redirect_stderr=true
+stdout_logfile=/dev/fd/1
+stdout_logfile_maxbytes=0
+
+[group:tower-processes]
+programs=celeryd,receiver,runworker,uwsgi,daphne,factcacher,nginx,flower
+priority=5
+