## Summary - remove MVP wording from repository docs and guidance - rename the system plan document and update references to it - align the default subscription plan code/name with product wording - document hard subscription expiry with no grace period ## Verification - docker build -f infra/docker/web.Dockerfile . - docker build -f infra/docker/migrate.Dockerfile . Co-authored-by: sirily <sirily@git.shararam.party> Reviewed-on: #15
2.0 KiB
2.0 KiB
Deployment Plan
Chosen target
Deploy on one VPS with Docker Compose.
Why this target
- The system has multiple long-lived components: web, worker, bot, database, and reverse proxy.
- Compose gives predictable service boundaries, easier upgrades, and easier recovery than manually managed host processes.
- It preserves clear service boundaries if separation is ever needed later.
Expected services
migrate: one-shot schema bootstrap job run before app services startweb: Next.js app serving the site, dashboard, admin UI, and API routesworker: background job processorbot: Telegram admin bot runtimepostgres: primary databasecaddy: TLS termination and reverse proxy- optional
minio: self-hosted object storage for single-server deployments
Deployment notes
- Run one Compose project on a single server.
- Keep persistent data in named volumes or external storage.
- Keep secrets in server-side environment files or a secret manager.
- Back up PostgreSQL and object storage separately.
- Prefer Telegram long polling to avoid an extra public webhook surface for the bot.
Upgrade strategy
- Build new images.
- Run the one-shot database schema job.
- Restart
web,worker, andbotin the same Compose project. - Roll back by redeploying the previous image set if schema changes are backward compatible.
Current database bootstrap state
- The current Compose template runs a
migrateservice beforeweb,worker, andbot. - The job runs
prisma migrate deployfrom the committed migration history. - The same bootstrap job also ensures the default
SubscriptionPlanrow exists after migrations. - Schema changes must land with a new committed Prisma migration before deployment.
Initial operational checklist
- provision VPS
- install Docker and Compose plugin
- provision DNS and TLS
- provision PostgreSQL storage
- provision S3-compatible storage or enable local MinIO
- create
.env - deploy Compose stack
- run database migration job
- verify web health, worker job loop, and bot polling