Docker fix RunOnce
This commit is contained in:
parent
01574aa03a
commit
5a93e2bf48
2 changed files with 11 additions and 6 deletions
|
|
@ -15,8 +15,10 @@ RUN chmod +x /root/entrypoint.sh
|
|||
|
||||
ENV PATH=$PDI_HOME/data-integration:$PATH
|
||||
|
||||
ENTRYPOINT ["/root/entrypoint.sh"]
|
||||
|
||||
FROM main AS runonce
|
||||
CMD ["bash", "-c", ". /root/.env.sh; /opt/pentaho-di/data-integration/kitchen.sh /file:////opt/pentaho-di/mappings/job_general.kjb > /proc/1/fd/1 2>&1"]
|
||||
ENV RUNONCE=true
|
||||
|
||||
FROM main AS cron
|
||||
ENTRYPOINT ["/root/entrypoint.sh"]
|
||||
ENV RUNONCE=false
|
||||
|
|
|
|||
|
|
@ -43,7 +43,10 @@ for F in $(find . -type f); do
|
|||
sed -i "s/Encrypted 2beebdaaa1ac8978aaa54aa72ce93bcc9/$DB_SUBPOENA_PASSWORD/g" $F
|
||||
done;
|
||||
|
||||
cat /root/crontab | crontab -
|
||||
#echo "*/10 * * * * bash -c \". /root/.env.sh; /opt/pentaho-di/data-integration/kitchen.sh /file:////opt/pentaho-di/mappings/job_general.kjb > /proc/1/fd/1 2>&1 \"" | crontab -
|
||||
|
||||
cron -f
|
||||
if [ $RUNONCE == true ]; then
|
||||
bash -c ". /root/.env.sh; /opt/pentaho-di/data-integration/kitchen.sh /file:////opt/pentaho-di/mappings/job_general.kjb > /proc/1/fd/1 2>&1"
|
||||
exit $?
|
||||
else
|
||||
cat /root/crontab | crontab -
|
||||
cron -f
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue