See Ash Code logo See Ash Code

The deployment script said success. The website was still broken.

Ashlynn Antrobus
• • 3 min read

The deployment script finished successfully. Opening the website still showed a broken application.

The script had completed the commands it was given. I needed to check whether those commands described the hosting stack that was actually serving the site.

A dragon tests a plank on a wooden footbridge, with a toolbox nearby.

Illustration: checking the result after the building work is done.

The June 6 deployment repair makes that distinction explicit. This host runs the application through LiteSpeed’s lswsgi and the CloudLinux Python Selector. A file named passenger_wsgi.py doesn’t establish that stock Passenger controls every part of startup.

Start with the existing application

The revised script deploys into an application already registered with the Python Selector. Registration, runtime environment variables, and database provisioning are separate setup requirements.

The selector injects the application’s database and service configuration into the serving process. The application-root .htaccess carries the routing directives that hand requests to that process. Uploading Python files doesn’t replace either arrangement.

That changes what the deployment script needs to do. It exports pinned requirements from the lockfile, uploads code and the built frontend, installs the requirements into the selector-managed environment, and requests an application restart.

It also treats a missing or empty frontend build as an error. Continuing after that condition would leave a deployment missing something the site needs.

Keep command and page outcomes separate

The stages have different observations:

StageA successful command can establishWhat still needs checking
UploadThe transfer command completed.The serving process imports the uploaded application.
Install dependenciesThe selector’s installation command completed.The process starts with those dependencies.
Request restartThe restart trigger was written.A new application process serves requests.
Probe a health URLThat request received an accepted HTTP response.The rest of the site’s behavior.

The incident began with a successful command sequence and a failing page outcome. I needed to follow the request into the serving process rather than read the final success message as a substitute for it.

Make verification part of the script

The repaired script probes the application, database, and GitHub health endpoints after restarting. If a probe keeps failing, it prints the HTTP status, a bounded excerpt of the response body, and recent application error-log lines.

That gives a failed deployment something more useful to report than a reassuring upload message. The script exits with a failure instead of reaching its final success line.

The probes have limits, which I’ll examine separately. They don’t exercise every page or user workflow. But they do ask the running site to answer before the script calls the deployment verified.

AA

Written by Ashlynn Antrobus

Software developer, author, and builder. Sharing technical lessons learned from building tools like Ebook2Text, IndexedDict, and rag-mcp, and navigating life as a programmer with dyslexia.