Skip to content

Commit

Permalink
update python template (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
runzexia authored and ks-ci-bot committed Mar 15, 2019
1 parent c8e273e commit 4ee0676
Showing 1 changed file with 74 additions and 10 deletions.
84 changes: 74 additions & 10 deletions config/templates/python.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,77 @@
apiVersion: devops.kubesphere.io/v1alpha1
kind: S2iBuilderTemplate
metadata:
labels:
controller-tools.k8s.io: "1.0"
name: s2ibuildertemplate-python
spec:
baseImages:
- kubespheredev/python-35-centos7
- kubespheredev/python-34-centos7
codeFramework: python
defaultBaseImage: kubespheredev/python-34-centos7
version: 0.0.1
labels:
controller-tools.k8s.io: "1.0"
name: python
spec:
baseImages:
- kubespheredev/python-36-centos7
- kubespheredev/python-35-centos7
- kubespheredev/python-34-centos7
- kubespheredev/python-27-centos7
environment:
- key: APP_SCRIPT
type: string
description: "Used to run the application from a script file. This should be a path to a script file (defaults to app.sh unless set to null) that will be run to start the application."
required: false
defaultValue: ""
- key: APP_FILE
description: "Used to run the application from a Python script. This should be a path to a Python file (defaults to app.py unless set to null) that will be passed to the Python interpreter to start the application."
required: false
defaultValue: ""
type: string
- key: APP_MODULE
description: "Used to run the application with Gunicorn, as documented here. This variable specifies a WSGI callable with the pattern MODULE_NAME:VARIABLE_NAME, where MODULE_NAME is the full dotted path of a module, and VARIABLE_NAME refers to a WSGI callable inside the specified module. Gunicorn will look for a WSGI callable named application if not specified.
If APP_MODULE is not provided, the run script will look for a wsgi.py file in your project and use it if it exists.
If using setup.py for installing the application, the MODULE_NAME part can be read from there. "
required: false
defaultValue: ""
type: string
- key: APP_HOME
description: "This variable can be used to specify a sub-directory in which the application to be run is contained. The directory pointed to by this variable needs to contain wsgi.py (for Gunicorn) or manage.py (for Django).
If APP_HOME is not provided, the assemble and run scripts will use the application's root directory."
required: false
defaultValue: ""
type: string
- key: APP_CONFIG
description: "Path to a valid Python file with a Gunicorn configuration file."
required: false
defaultValue: ""
type: string
- key: DISABLE_COLLECTSTATIC
description: "Set this variable to a non-empty value to inhibit the execution of 'manage.py collectstatic' during the build. This only affects Django projects."
required: false
defaultValue: ""
type: string
- key: DISABLE_SETUP_PY_PROCESSING
description: "Set this to a non-empty value to skip processing of setup.py script if you use -e . in requirements.txt to trigger its processing or you don't want your application to be installed into site-packages directory."
required: false
defaultValue: ""
type: string
- key: ENABLE_PIPENV
description: "Set this variable to use Pipenv, the higher-level Python packaging tool, to manage dependencies of the application. This should be used only if your project contains properly formated Pipfile and Pipfile.lock."
required: false
defaultValue: ""
type: string
- key: PIP_INDEX_URL
description: "Set this variable to use a custom index URL or mirror to download required packages during build process. This only affects packages listed in requirements.txt. Pipenv ignores this variable."
required: false
defaultValue: ""
type: string
- key: UPGRADE_PIP_TO_LATEST
description: "Set this variable to a non-empty value to have the 'pip' program and related python packages (setuptools and wheel) be upgraded to the most recent version before any Python packages are installed. If not set it will use whatever the default version is included by the platform for the Python version being used.."
required: false
defaultValue: ""
type: string
- key: WEB_CONCURRENCY
description: "Set this to change the default setting for the number of workers. By default, this is set to the number of available cores times 2, capped at 12."
required: false
defaultValue: ""
type: string
codeFramework: python
defaultBaseImage: kubespheredev/python-36-centos7
version: 0.0.1

0 comments on commit 4ee0676

Please sign in to comment.