[FastAPI] Cron jobs can't find config file location

  • I have described the bug in complete detail in the Description section.
  • I have specified steps in the Reproduction section.
  • I have included any logs related to the bug in the Logs section.
  • I have included the versions which are affected in the Version(s) section.

Description

Cron jobs can't find the config file as the AUR_CONFIG environment variable isn't passed to them. Revealed in a local fix to #206 (closed).

Reproduction

In a container configured with the AUR_CONFIG environment variable, use the following Cron config to see Cron jobs aren't exposed to the AUR_CONFIG variable:

* * * * * root echo "/${AUR_CONFIG}/" > /env.tmp

Running cat /env.tmp then prints out //.


Adding this line to the top of the Cron file fixes the issue:

AUR_CONFIG='/aurweb/conf/config'

This shouldn't need to be dynamically set as far as I'm currently aware, as I don't think we currently support the user using a custom config file location.

Logs

N/A

Version(s)

MPR: https://github.com/makedeb/mprweb/commit/1300b0b10a3b11f48fc9897e2db42923483096b4

Edited by Hunter Wittenborn