rtorrent-flood: add CONTEXT_PATH

This commit is contained in:
Wonderfall 2017-02-22 22:08:50 +01:00
parent 84183c01b6
commit 01251821b5
4 changed files with 8 additions and 3 deletions

View File

@ -8,6 +8,7 @@ ARG BUILD_CORES
ENV UID=991 GID=991 \
FLOOD_SECRET=supersecret \
CONTEXT_PATH=/ \
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \

View File

@ -17,9 +17,10 @@
- **BUILD_CORES** : number of cores used during build
#### Environment variables
- **UID** : user id
- **GID** : group id
- **FLOOD_SECRET** : flood secret key
- **UID** : user id (default : 991)
- **GID** : group id (defaut : 991)
- **FLOOD_SECRET** : flood secret key (defaut : mysupersecretkey) (CHANGE IT)
- **CONTEXT_PATH** : context path (base_URI) (default : /)
- **PKG_CONFIG_PATH** : `/usr/local/lib/pkgconfig` (don't touch)
#### Ports

View File

@ -1,4 +1,5 @@
const CONFIG = {
baseURI: '<CONTEXT_PATH>',
dbCleanInterval: 1000 * 60 * 60,
dbPath: '/flood-db/',
floodServerPort: 3000,

View File

@ -9,6 +9,8 @@ mkdir -p /data/Media/Animes
mkdir -p /data/Media/Music
sed -i -e "s/<FLOOD_SECRET>/$FLOOD_SECRET/g" /usr/flood/config.js
sed -i -e "s/<CONTEXT_PATH>/$CONTEXT_PATH/g" /usr/flood/config.js
rm -f /data/.session/rtorrent.lock
mv /usr/flood /usr/fix && mv /usr/fix /usr/flood # fix strange bug
chown -R $UID:$GID /data /home/torrent /tmp /filebot /usr/flood /flood-db /etc/s6.d