From 26329ee5842daa917e19a517c0a4ff2fd387cea0 Mon Sep 17 00:00:00 2001 From: Eric Dobbs Date: Sun, 25 Feb 2018 21:58:43 -0700 Subject: [PATCH] upgrade to wiki-0.14.0 and move configure-wiki to separate step We should only need to run the configure-wiki script once instead of every time we start the container. Also, I don't think that script was correctly handling PID 1 role (e.g. don't think we forwarded signals to node nor reaped zombies) --- Dockerfile | 8 ++++---- README.md | 11 +++++++++-- configure-and-launch-wiki => configure-wiki | 5 ----- 3 files changed, 13 insertions(+), 11 deletions(-) rename configure-and-launch-wiki => configure-wiki (96%) diff --git a/Dockerfile b/Dockerfile index 4a46bbb..dbeda63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,15 @@ RUN useradd --create-home app \ jq \ git WORKDIR /home/app -ARG WIKI_PACKAGE=wiki@0.13.0 +ARG WIKI_PACKAGE=wiki@0.14.0 RUN su app -c "npm install -g --prefix . $WIKI_PACKAGE" RUN su app -c "mkdir .wiki" -COPY configure-and-launch-wiki set-owner-name ./ -RUN chown app configure-and-launch-wiki set-owner-name +COPY configure-wiki set-owner-name ./ +RUN chown app configure-wiki set-owner-name VOLUME "/home/app/.wiki" ENV DOMAIN=localhost ENV OWNER_NAME="The Owner" ENV COOKIE=insecure EXPOSE 3000 USER app -CMD ["./configure-and-launch-wiki"] +CMD ["/home/app/bin/wiki"] diff --git a/README.md b/README.md index b11ed05..1b8969a 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,18 @@ Let's also use a different volume for this one: docker volume create localtest.me ``` -Specify the domain name when you launch your wiki +Specify the domain name and configure your wiki ``` bash docker run -p 3000:3000 -it --rm \ -v localtest.me:/home/app/.wiki \ -e DOMAIN=localtest.me \ + dobbs/farm configure-wiki +``` + +Now that configuration is complete, launch the wiki: +``` bash +docker run -p 3000:3000 -it --rm \ + -v localtest.me:/home/app/.wiki \ dobbs/farm ``` @@ -55,7 +62,7 @@ Open http://that.localtest.me:3000 in another. This image's tag matches the version of the included wiki software. ``` bash -git tag -am "" '0.13.0' +git tag -am "" '0.14.0' git push --tags ``` diff --git a/configure-and-launch-wiki b/configure-wiki similarity index 96% rename from configure-and-launch-wiki rename to configure-wiki index dafb603..825b968 100755 --- a/configure-and-launch-wiki +++ b/configure-wiki @@ -7,7 +7,6 @@ main() { ensure-owner-file ensure-config-file show-configs - exec-wiki } initialize-environment-vars() { @@ -70,8 +69,4 @@ show-configs() { set +x } -exec-wiki() { - exec /home/app/bin/wiki -} - main