EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit c98a00e3 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Cleanup of cron based re-authorization

parent 8b3bf73b
No related branches found
No related tags found
1 merge request!6Cache native swift
......@@ -72,8 +72,6 @@ RUN chmod -v +x \
/run-seeder.sh \
/entrypoint.sh
ADD mapcache.xml ${INSTALL_DIR}/
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/run-httpd.sh"]
#!/bin/bash -e
echo "Fetching auth token and storage URL"
# fetch a new token
eval $(swift auth)
echo "Fetched auth token ${OS_AUTH_TOKEN} and storage URL ${OS_STORAGE_URL}"
# render the template with the provided values
echo "Copying and adjusting MapCache configuration file"
mkdir -p "${INSTALL_DIR}"
cd "${INSTALL_DIR}"
cat /mapcache-template.xml \
| sed -e "s/{{OS_STORAGE_URL}}/$(echo ${OS_STORAGE_URL} | sed -e 's/[]\/$*.^[]/\\&/g')/g" \
| sed -e "s/{{OS_AUTH_TOKEN}}/$(echo ${OS_AUTH_TOKEN} | sed -e 's/[]\/$*.^[]/\\&/g')/g" \
| sed -e "s/{{BUCKET_NAME}}/$(echo ${BUCKET_NAME} | sed -e 's/[]\/$*.^[]/\\&/g')/g" > mapcache.xml
sed -e "s;http://localhost/ows;http://${RENDERER_HOST}/ows;" -i mapcache.xml
cd -
42 * * * * root /get-token-and-render.sh > /proc/1/fd/1 && /usr/sbin/apache2ctl -k graceful > /proc/1/fd/1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment