kiwix: fiddle
This commit is contained in:
parent
510d8d0cd2
commit
bddaa05363
2 changed files with 20 additions and 5 deletions
|
@ -24,3 +24,5 @@ WORKDIR /app
|
|||
USER 10600:10600
|
||||
|
||||
ENTRYPOINT [ "/srv/run.sh" ]
|
||||
|
||||
CMD [ "serve" ]
|
|
@ -1,13 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo ">>> Environment:"
|
||||
echo "[wrapper] NOMAD_PORT_KIWIX=$NOMAD_PORT_KIWIX"
|
||||
echo "[wrapper] Args: $*"
|
||||
mode="$1";
|
||||
shift;
|
||||
|
||||
echo ">>> Checking environment"
|
||||
echo ">>> Environment:";
|
||||
echo "[wrapper] NOMAD_PORT_KIWIX=$NOMAD_PORT_KIWIX";
|
||||
echo "[wrapper] Mode: ${mode}";
|
||||
echo "[wrapper] Args: $*";
|
||||
|
||||
echo ">>> Checking environment";
|
||||
if [[ -z "${NOMAD_PORT_KIWIX}" ]]; then
|
||||
echo "Error: The environment variable NOMAD_PORT_KIWIX is not set. It must be set to the port number to listen on." >&2;
|
||||
fi
|
||||
|
||||
echo ">>> Starting kiwix";
|
||||
/app/kiwix-serve --library --port "${NOMAD_PORT_KIWIX}" /srv/data;
|
||||
case "${mode}" in
|
||||
serve )
|
||||
echo ">>> kiwix-serve --library --port ${NOMAD_PORT_KIWIX} /srv/data";
|
||||
/app/kiwix-serve --library --port "${NOMAD_PORT_KIWIX}" /srv/data;
|
||||
;;
|
||||
* )
|
||||
echo ">>> kiwix-serve $*";
|
||||
/app/kiwix-serve "$@";
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue