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

Copy API key from a mounted /APIKEY.txt

parent 156a86b8
# Dockerfile for `delete_pad_after_delay`
This directory only contains an init script. It will grab the `$KEY`, `$DIR`, `$URL` and `$DEL` environment variables and pass them to `delete_pad_after_delay`. Only one instance is supported, it is (internally) named `instanceD`.
This directory only contains an init script. It will grab the `$DIR`, `$URL` and `$DEL` environment variables and pass them to `delete_pad_after_delay`. The API key will be read from the `/APIKEY.txt` file (it must be mounted somehow). You could check picasoft's docker-compose.yml as an example. Only one instance is supported, it is (internally) named `instanceD`.
#!/bin/bash
if [ ! -f "/APIKEY.txt" ] ; then >&2 echo "/APIKEY.txt 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). Aborting."; return 1; fi
export CF=/etc/delete_after_delay.yml
echo 'instanceD:' > $CF
echo " key: $KEY" >> $CF
echo " key: $(cat /APIKEY.txt)" >> $CF
echo " dir: $DIR" >> $CF
echo " url: $URL" >> $CF
echo " del: $DEL" >> $CF
......
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