fix(backend): resolve 4 deployment blockers (requirements.lock, imports, DB perms) #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/backend-deployment-blockers"
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?
Fixes walletpress backend deployment blockers
The walletpress backend was unable to start due to 4 issues. This PR fixes all of them.
#1 — requirements.lock incomplete
Problem:
requirements.lockwas missing deps. The Dockerfile usedrequirements.lockforpip install, so the runtime couldn't importpython-multipart(FastAPI Form data),mcp(MCP SDK), and various chain-specific deps.Fix: Switched Dockerfile to use
requirements.txt(which has all loose pins) instead of the incomplete lock. Also addedpython-multipart>=0.0.9andmcp>=1.25.0torequirements.txt.#2 — main.py wrong import name (AuditTrail)
Problem:
from core.audit import AuditTrail— class doesn't exist; onlyAuditLogdoes.Fix: Changed import and usage to
AuditLog.#3 — main.py wrong import path (PersistentStore)
Problem:
from routers.chain_vault import _PersistentStore— neither_PersistentStorenor_persistent_storeexists inchain_vault.py. The actual class isPersistentStore(no underscore prefix) inrouters/_persistent_store.py.Fix: Changed import to
from routers._persistent_store import PersistentStore.#4 — DB volume permissions
Problem:
/data/walletpress/walletpress.dbcouldn't be opened. The mounted volume had wrong ownership and the previous Dockerfile chown'd/dataat build time only.Fix: Added
entrypoint.shthat runs as root on container start, ensures/dataexists, chowns towalletpress:walletpress, thenexecs the CMD. Also fixed Dockerfile ordering (COPY entrypoint + chmod must happen before USER directive).Verification
After all fixes:
walletpress-backendUp (healthy)/backend/*via nginxFiles changed
backend/Dockerfile— switched to requirements.txt, fixed ordering, added entrypointbackend/entrypoint.sh— new file, chowns /data on container startbackend/main.py— fixed 2 wrong importsbackend/requirements.txt— added python-multipart + mcp