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:
parent
e37d746c69
commit
26329ee584
@ -6,15 +6,15 @@ RUN useradd --create-home app \
|
|||||||
jq \
|
jq \
|
||||||
git
|
git
|
||||||
WORKDIR /home/app
|
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 "npm install -g --prefix . $WIKI_PACKAGE"
|
||||||
RUN su app -c "mkdir .wiki"
|
RUN su app -c "mkdir .wiki"
|
||||||
COPY configure-and-launch-wiki set-owner-name ./
|
COPY configure-wiki set-owner-name ./
|
||||||
RUN chown app configure-and-launch-wiki set-owner-name
|
RUN chown app configure-wiki set-owner-name
|
||||||
VOLUME "/home/app/.wiki"
|
VOLUME "/home/app/.wiki"
|
||||||
ENV DOMAIN=localhost
|
ENV DOMAIN=localhost
|
||||||
ENV OWNER_NAME="The Owner"
|
ENV OWNER_NAME="The Owner"
|
||||||
ENV COOKIE=insecure
|
ENV COOKIE=insecure
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
USER app
|
USER app
|
||||||
CMD ["./configure-and-launch-wiki"]
|
CMD ["/home/app/bin/wiki"]
|
||||||
|
11
README.md
11
README.md
@ -39,11 +39,18 @@ Let's also use a different volume for this one:
|
|||||||
docker volume create localtest.me
|
docker volume create localtest.me
|
||||||
```
|
```
|
||||||
|
|
||||||
Specify the domain name when you launch your wiki
|
Specify the domain name and configure your wiki
|
||||||
``` bash
|
``` bash
|
||||||
docker run -p 3000:3000 -it --rm \
|
docker run -p 3000:3000 -it --rm \
|
||||||
-v localtest.me:/home/app/.wiki \
|
-v localtest.me:/home/app/.wiki \
|
||||||
-e DOMAIN=localtest.me \
|
-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
|
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.
|
This image's tag matches the version of the included wiki software.
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
git tag -am "" '0.13.0'
|
git tag -am "" '0.14.0'
|
||||||
git push --tags
|
git push --tags
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ main() {
|
|||||||
ensure-owner-file
|
ensure-owner-file
|
||||||
ensure-config-file
|
ensure-config-file
|
||||||
show-configs
|
show-configs
|
||||||
exec-wiki
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize-environment-vars() {
|
initialize-environment-vars() {
|
||||||
@ -70,8 +69,4 @@ show-configs() {
|
|||||||
set +x
|
set +x
|
||||||
}
|
}
|
||||||
|
|
||||||
exec-wiki() {
|
|
||||||
exec /home/app/bin/wiki
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
main
|
Loading…
x
Reference in New Issue
Block a user