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
Amine GHOZLANE
Python Django Template
Commits
7e028620
Commit
7e028620
authored
6 years ago
by
Thomas MENARD
Browse files
Options
Downloads
Patches
Plain Diff
Add Dockerfile, gitlab-ci
parent
9e98b199
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+0
-2
0 additions, 2 deletions
.gitlab-ci.yml
manifest.yaml
+10
-6
10 additions, 6 deletions
manifest.yaml
polls.yaml
+0
-69
0 additions, 69 deletions
polls.yaml
with
10 additions
and
77 deletions
.gitlab-ci.yml
+
0
−
2
View file @
7e028620
...
...
@@ -16,8 +16,6 @@ build:
-
docker build -t "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}" .
-
docker tag "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}" "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:latest"
-
docker push "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME/polls:${CI_COMMIT_SHORT_SHA}"
tags
:
-
k8s
deploy
:
stage
:
deploy
...
...
This diff is collapsed.
Click to expand it.
manifest.yaml
+
10
−
6
View file @
7e028620
...
...
@@ -29,6 +29,10 @@ metadata:
labels
:
app
:
postgresql
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
postgresql
strategy
:
type
:
Recreate
template
:
...
...
@@ -44,18 +48,18 @@ spec:
-
name
:
POSTGRES_USER
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
username
name
:
postgresql-credentials
key
:
username
-
name
:
POSTGRES_DB
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
database
name
:
postgresql-credentials
key
:
database
-
name
:
POSTGRES_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
postgresql-credentials
key
:
password
name
:
postgresql-credentials
key
:
password
ports
:
-
containerPort
:
5432
name
:
postgresql
...
...
This diff is collapsed.
Click to expand it.
polls.yaml
deleted
100755 → 0
+
0
−
69
View file @
9e98b199
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
polls
labels
:
app
:
polls
spec
:
replicas
:
3
template
:
metadata
:
labels
:
app
:
polls
spec
:
containers
:
name
:
polls-app
image
:
${CI_REGISTRY}/${CI_PROJECT_NAME}/polls:${CI_COMMIT_SHORT_SHA}
# This setting makes nodes pull the docker image every time before
# starting the pod. This is useful when debugging, but should be turned
# off in production.
imagePullPolicy
:
Always
env
:
-
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
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
polls
labels
:
app
:
polls
spec
:
type
:
ClusterIP
ports
:
-
port
:
80
targetPort
:
8080
selector
:
app
:
polls
---
apiVersion
:
extensions/v1beta1
kind
:
Ingress
metadata
:
annotations
:
kubernetes.io/ingress.class
:
traefik
labels
:
app
:
polls
name
:
polls
spec
:
rules
:
-
host
:
${CI_PROJECT_NAME}.pasteur.cloud
http
:
paths
:
-
backend
:
serviceName
:
polls
servicePort
:
80
path
:
/
\ No newline at end of file
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