Skip to content

Commit eb68a1d

Browse files
author
Matthew Fisher
committed
fix(controller): disable web UI
fixes #1144
1 parent 82c2a0d commit eb68a1d

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

controller/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ full-clean: clean
3131
$(call ssh_all,'sudo docker rmi deis/controller')
3232

3333
test:
34-
python manage.py test --noinput api web
34+
python manage.py test --noinput api
3535

3636
runserver:
3737
python manage.py runserver
@@ -40,7 +40,7 @@ db:
4040
python manage.py syncdb --migrate --noinput
4141

4242
coverage:
43-
coverage run manage.py test --noinput api web
43+
coverage run manage.py test --noinput api
4444
coverage html
4545

4646
flake8:

controller/bin/boot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ etcd_safe_set protocol ${DEIS_PROTOCOL:-http}
3434
etcd_safe_set secretKey ${DEIS_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`}
3535
etcd_safe_set builderKey ${DEIS_BUILDER_KEY:-`openssl rand -base64 64 | tr -d '\n'`}
3636
etcd_safe_set registrationEnabled 1
37+
etcd_safe_set webEnabled 0
3738

3839
# wait for confd to run once and install initial templates
3940
until confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null; do

controller/deis/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@
283283
# check if we can register users with `deis register`
284284
REGISTRATION_ENABLED = True
285285

286+
# check if we should enable the web UI module
287+
WEB_ENABLED = False
288+
286289
# default to sqlite3, but allow postgresql config through envvars
287290
DATABASES = {
288291
'default': {

controller/deis/urls.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import unicode_literals
99

10+
from django.conf import settings
1011
from django.conf.urls import patterns, include, url
1112
from django.contrib import admin
1213

@@ -19,5 +20,7 @@
1920
url(r'^accounts/', include('allauth.urls')),
2021
url(r'^admin/', include(admin.site.urls)),
2122
url(r'^api/', include('api.urls')),
22-
url(r'^', include('web.urls')),
2323
)
24+
25+
if settings.WEB_ENABLED:
26+
urlpatterns += patterns('', url(r'^', include('web.urls')))

controller/templates/confd_settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@
2828
{{ if .deis_controller_registrationEnabled }}
2929
REGISTRATION_ENABLED = bool({{ .deis_controller_registrationEnabled }})
3030
{{ end }}
31+
32+
{{ if .deis_controller_webEnabled }}
33+
WEB_ENABLED = bool({{ .deis_controller_webEnabled }})
34+
{{ end }}

0 commit comments

Comments
 (0)