- deploy.sh dev|prod with --dry-run, auto-rollback if /health fails
within 60s; checkpoint saved to .last_deploy_rollback before reset
- deploy/rollback.sh last|<sha> with the same Docker compose dance
- deploy/health-check.sh — curl wrapper for monitoring/oncall
- deploy/apache-{dev,prod}.conf — Location blocks proxying /hm-aiqc/
to gunicorn on 127.0.0.1:5050 with X-Script-Name set so wsgi.py's
ReverseProxied middleware emits prefixed URLs
- deploy/.env.{dev,prod}.example — starter envs with Azure SSO config
28 lines
919 B
Text
28 lines
919 B
Text
# Apache Location block for HM AI QC on optical-dev.
|
|
#
|
|
# Insert inside the existing <VirtualHost *:443> for
|
|
# ServerName optical-dev.oliver.solutions
|
|
# and reload:
|
|
# sudo systemctl reload apache2
|
|
#
|
|
# Required modules (enable once if not already):
|
|
# sudo a2enmod proxy proxy_http headers
|
|
#
|
|
# The X-Script-Name header is read by wsgi.py's ReverseProxied middleware
|
|
# so url_for() generates URLs prefixed with /hm-aiqc.
|
|
|
|
ProxyPass /hm-aiqc/ http://127.0.0.1:5050/
|
|
ProxyPassReverse /hm-aiqc/ http://127.0.0.1:5050/
|
|
|
|
# Bare /hm-aiqc (no trailing slash) → redirect with slash so the prefix matches
|
|
RewriteEngine On
|
|
RewriteRule ^/hm-aiqc$ /hm-aiqc/ [R=301,L]
|
|
|
|
<Location /hm-aiqc/>
|
|
RequestHeader set X-Script-Name "/hm-aiqc"
|
|
RequestHeader set X-Forwarded-Proto "https"
|
|
ProxyPreserveHost On
|
|
|
|
# Long-running endpoints (QC execution, Box searches, video analysis)
|
|
ProxyTimeout 600
|
|
</Location>
|