-
Notifications
You must be signed in to change notification settings - Fork 21
Deploy
Given that Coldsweat is a Flask application we can leverage the aboundance of documentation available. Please see Flask Deploying to Production page to pick your deploy solution of choice.
When using the default development web server, Coldsweat serves all static assets needed to run the web UI: CSS styles, JavaScript code, and images. This is convenient while writing software because developer keeps changing these file and she wants to see the changes to happen immediately.
However, when you deploy Coldsweat you want those assets to be loaded from the web server of choice, which is more efficient in serving static files. To do that Coldsweat integrates Flask CDN extension which lets you specify a different URL as "base path" for all assets.
This is done via the FLASK_CDN_DOMAIN
environment variable:
export FLASK_CDN_DOMAIN="cdn.example.com"
Or by adding CDN_DOMAIN
to Coldsweat config.toml
file:
# ...Other settings
CDN_DOMAIN="cdn.example.com"
See Flask-CDN Static Asset URLs for more information.