Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Python Django Template
Manage
Activity
Members
Labels
Plan
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
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
Quang tru HUYNH
Python Django Template
Commits
220b6b75
Commit
220b6b75
authored
6 years ago
by
Thomas MENARD
Browse files
Options
Downloads
Patches
Plain Diff
Add Dockerfile, gitlab-ci
parent
46295f0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
manifest.yaml
+80
-76
80 additions, 76 deletions
manifest.yaml
with
80 additions
and
76 deletions
manifest.yaml
+
80
−
76
View file @
220b6b75
...
...
@@ -22,7 +22,7 @@ data:
password
:
cG9sbHMK
database
:
cG9sbHMK
---
apiVersion
:
extensions/v1beta
1
apiVersion
:
apps/v
1
kind
:
Deployment
metadata
:
name
:
postgresql
...
...
@@ -38,91 +38,91 @@ spec:
tier
:
postgreSQL
spec
:
containers
:
-
image
:
postgres:9.6.2-alpine
-
name
:
postgresql
image
:
postgres:9.6.2-alpine
env
:
-
name
:
POSTGRES_USER
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
-
name
:
POSTGRES_DB
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
database
-
name
:
POSTGRES_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
ports
:
-
containerPort
:
5432
name
:
postgresql
env
:
-
name
:
POSTGRES_USER
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
-
name
:
POSTGRES_DB
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
database
-
name
:
POSTGRES_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
ports
:
-
containerPort
:
5432
name
:
postgresql
volumeMounts
:
-
name
:
postgresql
mountPath
:
/var/lib/postgresql/data
subPath
:
data
volumeMounts
:
-
name
:
postgresql
mountPath
:
/var/lib/postgresql/data
subPath
:
data
volumes
:
-
name
:
postgresql
persistentVolumeClaim
:
claimName
:
postgres-claim
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
-
name
:
postgresql
persistentVolumeClaim
:
claimName
:
postgres-claim
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
postgresql
labels
:
app
:
postgresql
app
:
postgresql
spec
:
ports
:
-
port
:
5432
-
port
:
5432
selector
:
app
:
postgresql
tier
:
postgreSQL
app
:
postgresql
tier
:
postgreSQL
---
apiVersion
:
extensions/v1beta
1
apiVersion
:
apps/v
1
kind
:
Deployment
metadata
:
name
:
polls
labels
:
app
:
polls
spec
:
replicas
:
3
replicas
:
1
template
:
metadata
:
labels
:
app
:
polls
spec
:
containers
:
-
name
:
polls-app
image
:
$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}
imagePullPolicy
:
Always
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
ports
:
-
containerPort
:
8080
-
name
:
polls-app
image
:
$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}
imagePullPolicy
:
Always
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
ports
:
-
containerPort
:
8080
volumes
:
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
---
apiVersion
:
v1
kind
:
Service
...
...
@@ -165,23 +165,27 @@ 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
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
secretKeyRef
:
name
:
postgresql-credentials
key
:
database
-
name
:
DATABASE_USER
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
-
name
:
DATABASE_PASSWORD
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
-
name
:
DATABASE_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
restartPolicy
:
Never
volumes
:
-
name
:
postgresql-credentials
secret
:
secretName
:
postgresql
backoffLimit
:
5
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