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)
This commit is contained in:
Eric Dobbs 2018-02-25 21:58:43 -07:00
parent e37d746c69
commit 26329ee584
3 changed files with 13 additions and 11 deletions

View File

@ -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"]

View File

@ -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
```

View File

@ -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