Skip to content

Conversation

@qwerty1q2w
Copy link

@qwerty1q2w qwerty1q2w commented Oct 26, 2022

ENV changes.

Dmitrii and others added 8 commits October 26, 2022 11:40
…erfom crontab changes in image and delete cron volume
Otherwise docker compose would be saying this error message: WARN[0000] The "w0rd" variable is not set. Defaulting to a blank string.
That stores container environmental values needed for running eramba to the actual .env file, othewise cron job has problems picking up environmentals that are ran with the container from docker compose
@qwerty1q2w qwerty1q2w mentioned this pull request Oct 26, 2022
@qwerty1q2w
Copy link
Author

qwerty1q2w commented Oct 26, 2022

Also we can try this in CRON
@yearly export $(cat -e "/proc/1/environ" | sed 's/\^@/\n/g' | grep 'CACHE\|HOST\|DB_') && /bin/sh /var/www/eramba/app/upgrade/bin/cake cron job yearly >> /var/log/cron.log 2>&1

I've added this way to 25th PR

@shrkz1
Copy link
Member

shrkz1 commented Oct 27, 2022

Also we can try this in CRON @yearly export $(cat -e "/proc/1/environ" | sed 's/\^@/\n/g' | grep 'CACHE\|HOST\|DB_') && /bin/sh /var/www/eramba/app/upgrade/bin/cake cron job yearly >> /var/log/cron.log 2>&1

I've added this way to 25th PR

look, i tried putting * * * * * echo $(cat -e "/proc/1/environ" | sed 's/\^@/\n/g' | grep 'CACHE\|HOST\|DB_') > /tmp/envs2.txt as a crontab entry, and then checked cat /tmp/envs2.txt and its empty
image

image

when i do it like this directly (not from crontab):
image

it works

maybe im not getting something - im not linux expert, but for now im gonna leave it like it is and ill let @elsombrante to test this properly before merging

@shrkz1 shrkz1 requested a review from elsombrante October 27, 2022 09:14
@shrkz1 shrkz1 added the enhancement New feature or request label Oct 27, 2022
@shrkz1 shrkz1 self-assigned this Oct 27, 2022
@elsombrante
Copy link
Member

Tested scenarios:

  1. Default credentials
  2. Changed credentials
  3. Docker composed, turned off, credentials changed and composed again

@elsombrante elsombrante merged commit 96d41c0 into 1.x Oct 31, 2022
@elsombrante elsombrante deleted the qwerty1q2w-dev branch October 31, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants