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
|
USER 10600:10600
|
||||||
|
|
||||||
ENTRYPOINT [ "/srv/run.sh" ]
|
ENTRYPOINT [ "/srv/run.sh" ]
|
||||||
|
|
||||||
|
CMD [ "serve" ]
|
|
@ -1,13 +1,26 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
echo ">>> Environment:"
|
mode="$1";
|
||||||
echo "[wrapper] NOMAD_PORT_KIWIX=$NOMAD_PORT_KIWIX"
|
shift;
|
||||||
echo "[wrapper] Args: $*"
|
|
||||||
|
|
||||||
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
|
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;
|
echo "Error: The environment variable NOMAD_PORT_KIWIX is not set. It must be set to the port number to listen on." >&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ">>> Starting kiwix";
|
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