Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
c962e4c8
Commit
c962e4c8
authored
Apr 22, 2021
by
carlosribas
Browse files
Remove debug_toolbar package from production
parent
04e375e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
Dockerfile
Dockerfile
+11
-5
rnacentral/rnacentral/settings.py
rnacentral/rnacentral/settings.py
+0
-2
rnacentral/rnacentral/urls.py
rnacentral/rnacentral/urls.py
+0
-2
No files found.
Dockerfile
View file @
c962e4c8
...
...
@@ -56,11 +56,6 @@ COPY rnacentral/requirements* .
# Install requirements
RUN
pip3
install
-r
requirements.txt
# Install packages for local development if needed
RUN
\
LOCAL_DEV
=
"
${
LOCAL_DEVELOPMENT
:-
False
}
"
&&
\
if
[
"
$LOCAL_DEV
"
=
"True"
]
;
then
pip3
install
-r
requirements_dev.txt
;
fi
# Install NPM dependencies
ADD
rnacentral/portal/static/package.json rnacentral/portal/static/
RUN
cd
rnacentral/portal/static
&&
npm
install
--only
=
production
...
...
@@ -69,6 +64,17 @@ RUN cd rnacentral/portal/static && npm install --only=production
COPY
rnacentral/ $RNACENTRAL_HOME/
RUN
chown
-R
rnacentral:rnacentral /srv/rnacentral
# Install and configure packages for local development if needed
RUN
\
LOCAL_DEV
=
"
${
LOCAL_DEVELOPMENT
:-
False
}
"
&&
\
if
[
"
$LOCAL_DEV
"
=
"True"
]
;
then
\
pip3
install
-r
requirements_dev.txt
;
\
sed
-i
"13 a import debug_toolbar"
"
${
RNACENTRAL_HOME
}
"
/rnacentral/urls.py
;
\
sed
-i
"31 a
\ \ \ \
url(r'^__debug__/', include(debug_toolbar.urls)),"
"
${
RNACENTRAL_HOME
}
"
/rnacentral/urls.py
;
\
sed
-i
"129 a
\ \ \ \
'debug_toolbar.middleware.DebugToolbarMiddleware',"
"
${
RNACENTRAL_HOME
}
"
/rnacentral/settings.py
;
\
sed
-i
"188 a
\ \ \ \
'debug_toolbar',"
"
${
RNACENTRAL_HOME
}
"
/rnacentral/settings.py
;
\
fi
# Set user
USER
rnacentral
...
...
rnacentral/rnacentral/settings.py
View file @
c962e4c8
...
...
@@ -127,7 +127,6 @@ MIDDLEWARE = (
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
# django-debug-toolbar
'debug_toolbar.middleware.DebugToolbarMiddleware'
,
# django-maintenance
'maintenancemode.middleware.MaintenanceModeMiddleware'
,
)
...
...
@@ -186,7 +185,6 @@ INSTALLED_APPS = (
'apiv1'
,
'django_filters'
,
# required by DRF3.5+
'rest_framework'
,
'debug_toolbar'
,
'compressor'
,
'markdown_deux'
,
'django_rq'
,
...
...
rnacentral/rnacentral/urls.py
View file @
c962e4c8
...
...
@@ -11,7 +11,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import
debug_toolbar
import
socket
from
django.conf.urls
import
url
,
include
...
...
@@ -29,7 +28,6 @@ urlpatterns = [
# new sequence search
url
(
r
'^sequence-search/'
,
include
(
'sequence_search.urls'
)),
# Django Debug Toolbar
url
(
r
'^__debug__/'
,
include
(
debug_toolbar
.
urls
)),
]
# robots.txt extras
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment