Configuration¶
An environment variable KOZMIC_CONFIG tells the application (kozmic.create_app() and tailer) which config to use. For example, to run a development server you can use the following command: KOZMIC_CONFIG=kozmic.config_local.DevelopmentConfig ./manage.py runserver
Variables¶
- SECRET_KEY
- A secret string. Used for signing cookie-based sessions, as a passphrase for private deploy keys, etc.
- SERVER_NAME
- The name and port number of the server (e.g., 'kozmic-ci.company.com' or '127.0.0.1:5000').
- SESSION_COOKIE_DOMAIN
The domain for the session cookie. If this is not set, the cookie will be valid for all subdomains of SERVER_NAME.
Note
If you’re using an IP address as a SERVER_NAME, you must specify the same IP address in SESSION_COOKIE_DOMAIN. Otherwise cookies will not work.
- KOZMIC_GITHUB_CLIENT_ID
- GitHub OAuth app client id
- KOZMIC_GITHUB_CLIENT_SECRET
- GitHub OAuth app client secret
- BROKER_URL
- Celery broker URL (default: 'redis://localhost:6379/0')
- MAIL_DEFAULT_SENDER
- “From” e-mail address to be used for notifications
- KOZMIC_REDIS_HOST
- Redis host (default: 'localhost')
- KOZMIC_REDIS_PORT
- Redis port (default: 6379)
- KOZMIC_REDIS_DATABASE
- Redis database (default: 0)
- KOZMIC_STALL_TIMEOUT
- Number of seconds since the last job output after which the job is considered “hung” and it’s Docker container gets killed (default: 900)
- KOZMIC_ENABLE_EMAIL_NOTIFICATIONS
- Whether e-mail notification enabled? (default: True)
- KOZMIC_CACHED_IMAGES_LIMIT
- The maximum number of cached Docker images (a cached image is a result of an install script) per project (default: 3)
- KOZMIC_USE_HTTPS_FOR_BADGES
If you’re planning to use Kozmic CI status images in GitHub README files, they must be served through HTTPS to prevent GitHub from caching them.
This variable only affects the UI and used for showing a correct badge URL (default: False)
- SQLALCHEMY_DATABASE_URI
- SQLAlchemy connection string (default: 'mysql+pymysql://kozmic:@127.0.0.1/kozmic')
- TAILER_URL_TEMPLATE
- URL template to be used to get a websocket URL for a job. Must point to a tailer application instance and contain job_id variable. (e.g., 'ws://kozmic-ci.example.com:8080/{job_id}/');
- DOCKER_URL
- Docker API URL (default: 'unix://var/run/docker.sock')
The default configuration expects to find an SMTP server on a local machine on port 25. It can be changed: http://pythonhosted.org/Flask-Mail/#configuring-flask-mail.