robustness: split jetstream into own container, add cursor persistence
Jetstream was running backgrounded in the same container as the API server, so crashes went undetected and Docker never restarted it. Now each process runs as a separate docker-compose service with independent restart policies. Also adds cursor persistence to SQLite (saved every 5s) so restarts resume from where they left off, moves event destructuring inside try/catch blocks, and adds global unhandled error/rejection handlers for crash visibility.
This commit is contained in:
@@ -14,4 +14,4 @@ ENV SQLITE_PATH=/data/notes.db
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["sh", "-c", "deno task migrate && deno task jetstream:prod & deno task server:prod"]
|
||||
CMD ["deno", "task", "server:prod"]
|
||||
|
||||
Reference in New Issue
Block a user