Commit f9a2880b authored by Romain Maliach-Auguste's avatar Romain Maliach-Auguste 🌵
Browse files

Specify read delays via envs

parent d8e6577c
......@@ -7,4 +7,6 @@ COPY ./delete_after_delay.pl ./delete_after_delay ./cpanfile.snapshot ./cpanfile
WORKDIR /opt/delete_after_delay
RUN carton install
COPY ./docker/init /
ENV READ_FILE_API_KEY_RETRIES 10
ENV READ_FILE_API_KEY_DELAY_BETWEEN_RETRIES_SECONDS 30
ENTRYPOINT ["/init"]
#!/bin/bash
let retries=10
api_key_retry_delay=30
let retries=$READ_FILE_API_KEY_RETRIES
api_key_retry_delay=$READ_FILE_API_KEY_DELAY_BETWEEN_RETRIES_SECONDS
while [ $retries -gt 0 ] && [ -v $(cat $APIKEY_PATH) ] ; do >&2 echo "APIKEY file (at $APIKEY_PATH ) must contain the etherpad instance's API key. Copy (or mount) it. It is generated by etherpad-lite at startup and placed in its root (usually /opt/etherpad-lite/APIKEY.txt). We'll trying again $retries more time(s), after having slept $api_key_retry_delay seconds."; sleep $api_key_retry_delay; let retries--; done
if [ $retries == 0 ] ; then >&2 echo "Failed to find APIKEY file (at $APIKEY_PATH ), aborting."; exit 1; fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment