Repository navigation
docs: Flask under gunicorn, database migrated on start - #113
Merged
Merged
Conversation
docker-deployment: run_flask.sh prepares the database and starts gunicorn, worker sizing, GUNICORN_WORKERS / GUNICORN_TIMEOUT, shared token secrets, stop grace period, nginx resolving Flask per request. database: migrations run on start (prepare_database / flask prepare-db), every migration reversible and independent of the current models. testing: test_migrations.py with TEST_DATABASE_URI, test_estimator_matching.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grzanka
approved these changes
Nov 19, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs for yaptide/yaptide#1710 (backend groundwork, PR: yaptide/yaptide#1724). Merge together with it. They describe the backend as of that PR.
Changes
run_flask.shprepares the database once, then starts gunicorn.2 × CPUs + 1, limited by memory, at most 32).YAPTIDE_TOKEN_SECRET/YAPTIDE_REFRESH_TOKEN_SECRETmust be set in production.GUNICORN_WORKERS,GUNICORN_TIMEOUT.prepare_database/flask prepare-db.sa.table).test_migrations.pyandtest_estimator_matching.pyin the tests table.TEST_DATABASE_URI.🤖 Generated with Claude Code