What things do Fief Workers do? #309
-
I've seen examples of Fief infrastructure that include a Fief Worker in the Docker Compose.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Fief requires to have a worker running to work properly. This is where happens all the background logic, like email sending, roles/permissions updates, tokens cleanup, etc. To ease things and get started quickly, our Docker image starts a Lines 1 to 17 in 9296856 While convenient for development and test purposes, it's generally admitted that it's not a good practice to have a Docker container run several processes. That's why our Docker Compose example recommends to have separate containers for each parts: a server, a worker and a Redis (and an SQL database). In terms of functionality, it doesn't change anything. It's just better for resilience and monitoring in production. Typically, you could independently scale the server and/or worker processes to handle more workload. |
Beta Was this translation helpful? Give feedback.
Fief requires to have a worker running to work properly. This is where happens all the background logic, like email sending, roles/permissions updates, tokens cleanup, etc.
To ease things and get started quickly, our Docker image starts a
supervisord
process which will spawn all the required processes (the server, the worker and a Redis server):fief/docker/supervisord.conf
Lines 1 to 17 in 9296856