Commit e03dbadd authored by Kenzo-Hugo Hillion's avatar 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
......@@ -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
......@@ -138,6 +138,8 @@ TEMPLATE_DEBUG = DEBUG
if DEBUG:
ALLOWED_HOSTS = ['*']
else:
ALLOWED_HOSTS = [env.str('ALLOWED_HOSTS', default='localhost')]
DATABASES = {
'default': {
......
......@@ -49,6 +49,8 @@ spec:
value: '6379'
- name: PORT
value: "8000"
- name: ALLOWED_HOSTS
value: "${NAMESPACE}.pasteur.cloud"
ports:
- containerPort: 8000
resources:
......
......@@ -8,7 +8,7 @@ metadata:
name: metagenedb
spec:
rules:
- host: ${CI_PROJECT_NAME}-dev.pasteur.cloud
- host: ${NAMESPACE}.pasteur.cloud
http:
paths:
- path: /
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment