Deploy: container + ops doc, running on the VPS #40
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Outcome
The service runs somewhere other than a developer's shell. Verified on
main:there is no Dockerfile, docker-compose, Procfile, systemd unit,
.gitea/workflowsor ops document. A billing service that is not hosted cannot take money.
Dependency
Dependency satisfied: app assembly #38 merged via PR #43. Verified current main contains
gitea_saas/app.py:create_appand rootwsgi.py.Scope
Dockerfile-- slim Python base, non-root user,gunicorn wsgi:application.docker-compose.yml-- the service plus a persistent volume for the SQLitefile. SQLite is the current store, so the volume is the durability story:
losing it loses the ledger. Say that in the compose comments.
OPS.md-- how to start, stop, back up the DB, rotateSAAS_API_KEY, andwhat to check when it is down.
HEALTHCHECKhitting/health.Ledger safety -- read before choosing anything clever
This process owns a money ledger. Two constraints that are not negotiable:
will corrupt or lock. Either run one worker, or enable WAL and serialise
writes explicitly. State which you chose and why in the PR.
cpin a comment. A ledger with no restore path is worse than no ledger,because it looks reliable.
Files this issue owns
Dockerfile,docker-compose.yml,OPS.md,.dockerignore.Acceptance
docker compose upserves/healthon a clean checkout with no host Python.docker compose down && up-- asserted by creating a client,restarting, and reading it back.
in the PR. Do not mark this done on an untested restore.
Execution boundary (Vale)
Prepare and validate locally first, on branch
issue-40; no production credential changes, public exposure, paid provisioning, or live ledger writes. If Docker/VPS access is unavailable, report the exact blocker and leave deployment acceptance incomplete. Never substitute mocks for required Docker persistence/restore tests. All other files forbidden. Runpython -m pytest -qplus the container/persistence/restore acceptance commands and record real outputs.[owner-decision] Euro requested execution of the income methods. Dependency verified on current main: PR #43 is merged and app.py/create_app plus wsgi.py exist. Removing stale dependency block; implement the scoped ticket, test, and open one PR. No public launch, real payments, or production ledger changes under this ticket without separate approval.
[lane1] implemented #40 on branch
issue-40, commit5be23b9; PR #50 open for review.Host gate:
python -m pytest -q-> 273 passed, 1 skipped;git diff --checkclean.Container acceptance (all executed locally, branch
issue-40, no host Python for the service):docker compose up --build->/healthHTTP 200{"ok":true};docker inspecthealth=healthy.docker compose down && up-> balance 2500 read back intact (named-volume SQLite).gitea-saas_saas_data; up. Verified:PRAGMA integrity_check-> ok, clients=[persist-test-A], ledger rows=1, client A 200 / client B 404.Deployment boundary respected: local validation only, no VPS run / public exposure / live ledger writes (owner-approved scoped ticket). The VPS deployment step itself stays a separate owner action.