Runtime roles
APP_ROLE decides which runners a single binary starts. These are three modes of one program, not three separate executables.
Values
| Value | HTTP / gRPC | Queues and schedulers | Use case |
|---|---|---|---|
all | Started | Started | Local development, single host |
web | Started | Not started | API layer in split deployments |
worker | Not started | Started | Task layer in split deployments |
The default is all. At runtime the disabled runner list closes the matching runners. For example, web disables goravel:queue, goravel:schedule and mail:queue.
Single host
Use the default all role. One process handles everything, suitable for small scale and moderate concurrency.
Split deployment
Start web and worker as separate processes or containers against the same database and Redis:
- web handles requests and enqueuing only, and consumes no tasks
- worker consumes both
defaultandemailsqueues and runs scheduled jobs - worker can scale horizontally; scheduled jobs deduplicate via
OnOneServer()and execution locks
WARNING
Mail delivery depends on worker. web only enqueues. If worker is not running, mail stays queued while the API still returns success. Keep worker running in split deployments.
systemd injection
Prefix the role with /usr/bin/env rather than using only Environment=:
[Service]
EnvironmentFile=/etc/missmeow-admin/app.env
ExecStart=/usr/bin/env APP_ROLE=web /opt/missmeow-admin/backend/bin/app serveEnvironmentFile overrides variables of the same name in Environment=. If .env keeps APP_ROLE=all, a plain Environment= entry is silently overridden.
