Deploy pipeline¶
App Service is configured with Oryx builds (SCM_DO_BUILD_DURING_DEPLOYMENT=true). Collectstatic is disabled during Oryx (DISABLE_COLLECTSTATIC=true) and runs at startup instead.
Bootstrap¶
PRE_BUILD_COMMAND is:
That downloads scripts from this repository’s deploy_scripts/ into the app checkout:
| Destination | Files |
|---|---|
cicd/ |
pre_build.sh, post_build.sh, startup.sh, collectstatic.sh, gunicorn.conf.py, supervisord.conf, wsgi.py, html-minifier.json |
utility/ |
pgdump.sh |
Existing files are skipped, so you can vendor/customize by committing your own copies under cicd/.
Branch override: set App Setting CICD_SCRIPTS_BRANCH (default main).
After download, bootstrap runs cicd/pre_build.sh.
Pre-build (cicd/pre_build.sh)¶
- If
package.jsonexists:npm ciandnpm run build:js(if present) - HTML minify via
html-minifier-next(ENABLE_HTML_MINIFY,EXCLUDE_HTML_MINIFY) - SVG minify via
svgo(ENABLE_SVG_MINIFY; optionalcicd/svgo.config.mjs) - Optional Tailwind if
TAILWIND_INPUT_PATHis set (TAILWIND_OUTPUT_PATHoptional) - Install Poetry, export
requirements.txtfor Oryx - Write
build-info.jsonfromSCM_COMMIT_ID
Post-build (cicd/post_build.sh)¶
Runs as POST_BUILD_COMMAND. Prunes npm production deps when a lockfile is present.
Startup (cicd/startup.sh)¶
Configured as the site startup command by the package’s deploy layout:
- Optional
EXTRA_APT_PACKAGES compilemessages(gettext)- Background
collectstatic.sh(collectstatic +purge_cdn) migratepurge_cache- Supervisord RQ worker (
rqworkerwithdjango_tasks_rq.Job) when tasks/Redis are enabled - Optional consumer hook
cicd/pre_startup.sh - Gunicorn via
cicd/gunicorn.conf.pyloadingcicd.wsgi
What the consumer app must provide¶
- A Poetry project that exports cleanly to
requirements.txt DJANGO_SETTINGS_MODULEpointing at a module that imports this package’s Azure settings- Git repository wired via Pulumi
repository_url/repository_branch - Optional: committed overrides under
cicd/