Skip to content

while this is fine but the environment variable declated in the docker file will not be picked up by cron #6

@sanfx

Description

@sanfx

I disovered even if you have environement variable defined in the dockerfile or in the docker stack file , the environment variable will be available to shell if container but not to the cron. for that you would need to define env variable inside the cron file.

MYSQL_PASSWORD=secret_password
PYTHONPATH=/usr/local/app

*/45 * * * * python3 app.py >> /var/log/cron.log 2>&1
# An empty line is required at the end of this file for a valid cron file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions