Closed loicjaouen closed 1 year ago
locally:
make run
# or
docker run --env-file env/dasch.env -v output:/app/output --rm platec/tds_cache_updater:v2.0.0
does the job
pushing image to docker hub
running remotely works too:
podman pull platec/tds_cache_updater:v2.0.0
/usr/bin/podman run --env-file ${CACHE_RUN_DIR}/updater_prod_env -v ${CACHE_RUN_DIR}/output:/app/output platec/tds_cache_updater:v2.0.0
graphdb wrapper was taking care of errors and did not generate files if any.
this is not the case now...
On prod there is a cron job running the cache updater container and copying the files into the application container.
So far it was using a:
${PODMAN_RUN} && for file in `ls ${LOCAL_CACHE}/*.json`; do sudo podman cp $file tds:/usr/share/nginx/html/cache/; done
replacing the for
by a find
checking for empty files:
5 3 * * 6 /usr/bin/podman run --env-file $(ENV_PROD) -v ${LOCAL_CACHE}:/app/output platec/tds_cache_updater:v2.0.0 && find ${LOCAL_CACHE} -name '*.json' -type f ! -size 0 -exec sudo podman cp {} tds:/usr/share/nginx/html/cache/ \;
re-enabling crontab and automatic cache update at 5 past 3 o'clock on saturday mornings.
fixes #211