Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
e03dbadd
Commit
e03dbadd
authored
Jun 18, 2020
by
Kenzo-Hugo Hillion
♻
Browse files
add allowed host for non debug backend
parent
dad5df42
Pipeline
#32504
passed with stages
in 3 minutes and 44 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
e03dbadd
...
...
@@ -60,7 +60,7 @@ test-backend:
-
until pg_isready -h ${DATABASE_HOST}; do echo waiting; sleep 2; done;
-
pytest --cov .
deploy
:
deploy
-dev
:
stage
:
deploy
image
:
registry-gitlab.pasteur.fr/dsi-tools/docker-images:docker_kubernetes_image
variables
:
...
...
@@ -76,3 +76,18 @@ deploy:
refs
:
-
dev
deploy-prod
:
stage
:
deploy
image
:
registry-gitlab.pasteur.fr/dsi-tools/docker-images:docker_kubernetes_image
variables
:
NAMESPACE
:
${CI_PROJECT_NAME}
environment
:
name
:
${CI_PROJECT_NAME}
url
:
https://${CI_PROJECT_NAME}.pasteur.cloud
script
:
-
sh ci/deploy/deploy.sh
tags
:
-
k8s
only
:
refs
:
-
master
backend/metagenedb/settings/django.py
View file @
e03dbadd
...
...
@@ -138,6 +138,8 @@ TEMPLATE_DEBUG = DEBUG
if
DEBUG
:
ALLOWED_HOSTS
=
[
'*'
]
else
:
ALLOWED_HOSTS
=
[
env
.
str
(
'ALLOWED_HOSTS'
,
default
=
'localhost'
)]
DATABASES
=
{
'default'
:
{
...
...
ci/kubernetes/backend.yaml
View file @
e03dbadd
...
...
@@ -49,6 +49,8 @@ spec:
value
:
'
6379'
-
name
:
PORT
value
:
"
8000"
-
name
:
ALLOWED_HOSTS
value
:
"
${NAMESPACE}.pasteur.cloud"
ports
:
-
containerPort
:
8000
resources
:
...
...
ci/kubernetes/ingress.yaml
View file @
e03dbadd
...
...
@@ -8,7 +8,7 @@ metadata:
name
:
metagenedb
spec
:
rules
:
-
host
:
${
CI_PROJECT_NAME}-dev
.pasteur.cloud
-
host
:
${
NAMESPACE}
.pasteur.cloud
http
:
paths
:
-
path
:
/
...
...
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