Skip to content

Commit

Permalink
Include a default value for MONGODB_INDEXTTL in a manner consistent w…
Browse files Browse the repository at this point in the history
…ith other containers.

Signed-off-by: Jesse Bowling <[email protected]>
  • Loading branch information
Jesse Bowling committed Nov 6, 2019
1 parent 4f36be4 commit f7151a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mnemosyne.run.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ then
sed -i "s/mongo_host *=.*/mongo_host = ${MONGODB_HOST}/" {{ mnemosyne_dir }}/mnemosyne.cfg
sed -i "s/mongo_port *=.*/mongo_port = ${MONGODB_PORT}/" {{ mnemosyne_dir }}/mnemosyne.cfg
if [[ ! -z "${MONGODB_INDEXTTL}" ]]; then
sed -i "s/mongo_indexttl *=.*/mongo_indexttl = ${MONGODB_INDEXTTL}/" {{ mnemosyne_dir }}/mnemosyne.cfg
sed -i "s/mongo_indexttl *=.*/mongo_indexttl = ${MONGODB_INDEXTTL:-2592000}/" {{ mnemosyne_dir }}/mnemosyne.cfg
fi
sed -i "s/ignore_rfc1918 *=.*/ignore_rfc1918 = ${IGNORE_RFC1918}/" {{ mnemosyne_dir }}/mnemosyne.cfg

Expand Down
4 changes: 4 additions & 0 deletions mnemosyne.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ HPFEEDS_PORT=10000
MONGODB_HOST='mongodb'
MONGODB_PORT=27017

# MONGODB_INDEXTTL sets the number of seconds to keep data in the mongo database
# This default value is 30 days
MONGODB_INDEXTTL=2592000

IGNORE_RFC1918=False

0 comments on commit f7151a0

Please sign in to comment.