Using spredr
Configuring a service
How it is built and how it runs: the branch, the folder, the Dockerfile, the start command, the port, the health path, the memory and the region. With no flags, spredr settings shows what it has.
terminal
$spredr settings
$spredr settings mi-api --memory 512
--branch <branch>The branch it follows: every push to it publishes a release.
--root <folder>The service's folder inside the repo, for a repo with several services.
--dockerfile <path>A Dockerfile inside that folder, like Dockerfile.worker. Without one, spredr detects your language.
--command <cmd>The start command, if it isn't the image's. Empty goes back to the image's.
--port <n>The port your app listens on.
--health </ruta>A path that answers 200 when it is ready. With no path, the service is a worker: healthy while its process keeps running, with no public address.
--memory <MB>Its memory limit, from 64 MB up to what your plan allows. It counts against your account's memory.
--region <us|eu>Where it runs: as close as possible to your database.
a worker
A bot or an agent, with no address
A worker is a service with no health path. It gets no traffic: it runs its process and spredr watches it while it keeps running. It's for bots, agents and queue consumers.
terminal
$spredr settings mi-agente --root apps/agent --command 'node src/agent.ts'