Skip to content

Commit

Permalink
feat: print otterwiki, nginx and supervisord versions
Browse files Browse the repository at this point in the history
This closes #188.
  • Loading branch information
redimp committed Jan 23, 2025
1 parent f5462ba commit 0d49d1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,11 @@ for PLUGIN in /app-data/plugins/*/ /plugins/*/; do
pip install -U . || echo "Error: Installation of plugin in $PLUGIN failed." >&2
done

# print nginx version
nginx -v
# run nginx config test
nginx -t
echo -n "supervisord version "
supervisord -v

exec "$@"
7 changes: 7 additions & 0 deletions otterwiki/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# vim: set et ts=8 sts=4 sw=4 ai:

import os
import sys
import logging
import datetime
from flask import Flask
Expand Down Expand Up @@ -58,6 +59,12 @@
)
app.config.from_envvar("OTTERWIKI_SETTINGS", silent=True)

# print current version
print(
f"*** Starting An Otter Wiki {__version__} {os.getenv('GIT_TAG', '')}",
file=sys.stderr,
)

# check if any config option exists as environment variable
for key in app.config:
if key in os.environ:
Expand Down

0 comments on commit 0d49d1b

Please sign in to comment.