@@ -42,10 +42,13 @@ def down(c, volumes=False):
42
42
'webpack' : 'Start webpack development server (default: False)' ,
43
43
'ext-theme' : 'Enable new theme from ext-theme (default: False)' ,
44
44
'scale-build' : 'Add additional build instances (default: 1)' ,
45
- 'ngrok' : 'ngrok domain to serve the application. Example: "17b5-139-47-118-243.ngrok.io"' ,
45
+ 'http-domain' : 'Configure a production domain for HTTP traffic. Subdomains included, '
46
+ 'example.dev implies *.examples.dev for proxito. Example: '
47
+ '"17b5-139-47-118-243.ngrok.io"' ,
46
48
'log-level' : 'Logging level for the Django application (default: INFO)' ,
49
+ 'django-debug' : 'Sets the DEBUG Django setting (default: True)' ,
47
50
})
48
- def up (c , search = True , init = False , reload = True , webpack = False , ext_theme = False , scale_build = 1 , ngrok = "" , log_level = 'INFO' ):
51
+ def up (c , search = True , init = False , reload = True , webpack = False , ext_theme = False , scale_build = 1 , http_domain = "" , django_debug = True , log_level = 'INFO' ):
49
52
"""Start all the docker containers for a Read the Docs instance"""
50
53
cmd = []
51
54
@@ -67,10 +70,12 @@ def up(c, search=True, init=False, reload=True, webpack=False, ext_theme=False,
67
70
cmd .insert (0 , 'RTD_EXT_THEME_DEV_SERVER_ENABLED=t' )
68
71
if ext_theme :
69
72
cmd .insert (0 , 'RTD_EXT_THEME_ENABLED=t' )
70
- if ngrok :
71
- cmd .insert (0 , f'RTD_PRODUCTION_DOMAIN={ ngrok } ' )
72
- cmd .insert (0 , f'NGINX_WEB_SERVER_NAME={ ngrok } ' )
73
- cmd .insert (0 , f'NGINX_PROXITO_SERVER_NAME=*.{ ngrok } ' )
73
+ if django_debug :
74
+ cmd .insert (0 , 'RTD_DJANGO_DEBUG=t' )
75
+ if http_domain :
76
+ cmd .insert (0 , f'RTD_PRODUCTION_DOMAIN={ http_domain } ' )
77
+ cmd .insert (0 , f'NGINX_WEB_SERVER_NAME={ http_domain } ' )
78
+ cmd .insert (0 , f'NGINX_PROXITO_SERVER_NAME=*.{ http_domain } ' )
74
79
75
80
cmd .append ('up' )
76
81
0 commit comments