Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sanfx opened this issue Oct 2, 2021 · 0 comments

Comments

@sanfx
Copy link

sanfx commented Oct 2, 2021

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant