django-ex/openshift/templates/django.json

261 lines
6.5 KiB
JSON
Raw Normal View History

{
"kind": "Template",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
2015-06-11 21:05:29 +02:00
"name": "django-example",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "An example Django application with no database",
2016-02-24 21:44:44 +01:00
"tags": "quickstart,python,django",
2015-06-11 21:05:29 +02:00
"iconClass": "icon-python"
}
},
"labels": {
2015-06-11 21:05:29 +02:00
"template": "django-example"
},
"objects": [
{
"kind": "Service",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "django-example"
}
}
},
2015-06-08 21:31:12 +02:00
{
"kind": "Route",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
2015-06-08 21:31:12 +02:00
"metadata": {
"name": "django-example"
2015-06-08 21:31:12 +02:00
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
2015-06-11 21:05:29 +02:00
"to": {
"kind": "Service",
"name": "django-example"
2015-06-11 21:05:29 +02:00
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
2015-06-08 21:31:12 +02:00
}
2015-06-11 17:19:47 +02:00
},
{
"kind": "BuildConfig",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
2015-06-11 21:05:29 +02:00
"name": "django-example",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
2015-06-16 12:07:49 +02:00
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
2015-06-11 21:05:29 +02:00
"kind": "ImageStreamTag",
"namespace": "openshift",
2015-11-21 00:26:32 +01:00
"name": "python:3.4"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "django-example:latest"
}
},
"triggers": [
{
2015-06-11 17:19:47 +02:00
"type": "ImageChange"
},
2015-11-21 00:26:32 +01:00
{
"type": "ConfigChange"
},
{
2015-06-11 17:19:47 +02:00
"type": "GitHub",
"github": {
2015-06-11 21:05:29 +02:00
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
],
"postCommit": {
"script": "./manage.py test"
}
}
},
{
"kind": "DeploymentConfig",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
2015-06-11 21:05:29 +02:00
"django-example"
],
"from": {
2015-06-11 21:05:29 +02:00
"kind": "ImageStreamTag",
"name": "django-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "django-example"
},
"template": {
"metadata": {
"name": "django-example",
"labels": {
"name": "django-example"
}
},
"spec": {
"containers": [
{
2015-06-11 21:05:29 +02:00
"name": "django-example",
"image": "django-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "DATABASE_ENGINE",
"value": "${DATABASE_ENGINE}"
},
{
"name": "DATABASE_NAME",
"value": "${DATABASE_NAME}"
},
{
"name": "DATABASE_USER",
"value": "${DATABASE_USER}"
},
{
"name": "DATABASE_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "APP_CONFIG",
"value": "${APP_CONFIG}"
},
{
"name": "DJANGO_SECRET_KEY",
"value": "${DJANGO_SECRET_KEY}"
}
]
}
]
}
}
}
2015-06-01 19:17:48 +02:00
}
],
"parameters": [
{
2015-06-11 21:05:29 +02:00
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/django-ex.git"
},
2015-06-16 12:07:49 +02:00
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
2015-08-18 19:19:30 +02:00
"description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.",
"value": ""
},
{
2015-06-11 21:05:29 +02:00
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
2015-06-08 21:31:12 +02:00
{
2015-06-11 21:05:29 +02:00
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name"
2015-06-08 21:31:12 +02:00
},
{
"name": "DATABASE_ENGINE",
"description": "Database engine: postgresql, mysql or sqlite (default)"
},
{
"name": "DATABASE_NAME",
"description": "Database name"
},
{
"name": "DATABASE_USER",
"description": "Database user name"
},
{
"name": "DATABASE_PASSWORD",
"description": "Database user password"
},
{
"name": "APP_CONFIG",
"description": "Relative path to Gunicorn configuration file (optional)"
},
{
"name": "DJANGO_SECRET_KEY",
"description": "Set this to a long random string",
"generate": "expression",
"from": "[\\w]{50}"
}
]
}