Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Python Django Template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kubernetes Templates
Python Django Template
Commits
74f748ab
Commit
74f748ab
authored
6 years ago
by
Thomas MENARD
Browse files
Options
Downloads
Patches
Plain Diff
Update mysite/settings.py, manifest.yaml files
parent
badbb3b0
No related branches found
No related tags found
1 merge request
!1
Update with a working example
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
manifest.yaml
+37
-37
37 additions, 37 deletions
manifest.yaml
mysite/settings.py
+1
-1
1 addition, 1 deletion
mysite/settings.py
with
38 additions
and
38 deletions
manifest.yaml
+
37
−
37
View file @
74f748ab
...
...
@@ -151,53 +151,53 @@ spec:
apiVersion
:
extensions/v1beta1
kind
:
Ingress
metadata
:
annotations
:
annotations
:
kubernetes.io/ingress.class
:
traefik
labels
:
labels
:
app
:
polls
name
:
polls
name
:
polls
spec
:
rules
:
-
host
:
${CI_PROJECT_NAME}.k8s-dev.pasteur.fr
rules
:
-
host
:
${CI_PROJECT_NAME}.k8s-dev.pasteur.fr
http
:
paths
:
-
backend
:
serviceName
:
polls
servicePort
:
8080
path
:
/
path
:
/
---
apiVersion
:
batch/v1
kind
:
Job
metadata
:
name
:
polls-migrations
name
:
polls-migrations
spec
:
template
:
spec
:
containers
:
-
name
:
django
image
:
$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}
command
:
[
'
python'
,
'
manage.py'
,
'
migrate'
]
env
:
-
name
:
DATABASE_NAME
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
database
-
name
:
DATABASE_USER
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
-
name
:
DATABASE_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
restartPolicy
:
Never
imagePullSecrets
:
-
name
:
registry-gitlab
volumes
:
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
backoffLimit
:
5
template
:
spec
:
containers
:
-
name
:
django
image
:
$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}
command
:
[
'
python'
,
'
/app/
manage.py'
,
'
migrate'
]
env
:
-
name
:
DATABASE_NAME
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
database
-
name
:
DATABASE_USER
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
-
name
:
DATABASE_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
restartPolicy
:
Never
imagePullSecrets
:
-
name
:
registry-gitlab
volumes
:
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
backoffLimit
:
5
This diff is collapsed.
Click to expand it.
mysite/settings.py
+
1
−
1
View file @
74f748ab
...
...
@@ -85,7 +85,7 @@ DATABASES = {
'
NAME
'
:
'
polls
'
,
'
USER
'
:
os
.
getenv
(
'
DATABASE_USER
'
),
'
PASSWORD
'
:
os
.
getenv
(
'
DATABASE_PASSWORD
'
),
'
HOST
'
:
os
.
getenv
(
'
DATABASE_
NAME
'
),
'
HOST
'
:
os
.
getenv
(
'
DATABASE_
HOST
'
),
'
PORT
'
:
'
5432
'
,
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment