diff --git a/.env.template b/.env.template index 15bc0dd0..f9930414 100644 --- a/.env.template +++ b/.env.template @@ -14,5 +14,8 @@ MAINTENANCE_MODE=false MAINTENANCE_MESSAGE=המערכת בתחזוקה תכנונית. אנא נסו שוב מאוחר יותר. # Enables the background job worker + schedule heartbeat (recurring jobs like -# attendance-cleanup-sweep) on this server instance. +# attendance-cleanup-sweep) on this server instance. Defaults to true for the +# common single-container deployment. If ever running multiple server +# replicas, keep this true on only one of them (or a dedicated worker +# instance) - the heartbeat isn't safe to double-fire. WORKER_ENABLED=true diff --git a/docker-compose-swarm.yml b/docker-compose-swarm.yml index e57f02e9..f59c6e2e 100644 --- a/docker-compose-swarm.yml +++ b/docker-compose-swarm.yml @@ -96,7 +96,7 @@ services: SMTP_PASSWORD: $SMTP_PASSWORD MAINTENANCE_MODE: $MAINTENANCE_MODE MAINTENANCE_MESSAGE: $MAINTENANCE_MESSAGE - WORKER_ENABLED: $WORKER_ENABLED + WORKER_ENABLED: ${WORKER_ENABLED:-true} # ports: # - '30004:3000' networks: diff --git a/docker-compose.yml b/docker-compose.yml index 12ab48d2..0ea51f2a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,7 @@ services: SMTP_PASSWORD: $SMTP_PASSWORD MAINTENANCE_MODE: $MAINTENANCE_MODE MAINTENANCE_MESSAGE: $MAINTENANCE_MESSAGE - WORKER_ENABLED: $WORKER_ENABLED + WORKER_ENABLED: ${WORKER_ENABLED:-true} depends_on: - database labels: