Skip to content

Long-running services

Services need more lifecycle structure than one-shot commands.

  • Build an image with the service and dependencies.
  • Declare the service command as the entrypoint.
  • Declare ports explicitly.
  • Add readiness checks where supported.
  • Use mvmctl logs, mvmctl wait, and mvmctl boot-report for diagnostics.
Terminal window
mvmctl up ./mvm.toml --name api-dev -p 8080:8080
mvmctl wait api-dev --for all
mvmctl logs api-dev -f
  • Bind only the ports the caller needs.
  • Keep egress policy separate from inbound port exposure.
  • Use cold mode only when preserving service state is intentional.
  • Make stop/destroy semantics explicit in SDK examples.