7 Commits

Author SHA1 Message Date
5e6f732fed Bump wiki to version 0.19.0 2019-08-14 12:07:10 -04:00
f85afce8c8 Change base image to node:10-alpine & wiki to 0.17.0 2019-03-27 22:26:09 -06:00
76280f3e7b Update wiki to 0.16.2 2019-03-11 08:00:53 -06:00
356afda8a7 Update wiki version for security fix 2018-11-27 21:10:15 -08:00
e9bd94e860 remind myself how to publish plugin experiments 2018-02-28 08:23:21 -07:00
b0be20f5f3 point to local-farm.wiki.dbbs.co instead 2018-02-25 22:32:46 -07:00
26329ee584 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)
2018-02-25 21:58:43 -07:00
3 changed files with 28 additions and 36 deletions

View File

@ -1,20 +1,20 @@
FROM node:8-slim
FROM node:10-alpine
RUN useradd --create-home app \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
RUN adduser -D -h /home/app app \
&& apk add --update --no-cache \
bash \
jq \
git
WORKDIR /home/app
ARG WIKI_PACKAGE=wiki@0.13.0
ARG WIKI_PACKAGE=wiki@0.19.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

@ -2,6 +2,11 @@
http://fed.wiki.org
Although this container can run alone, I use and develop it with
a reverse proxy. See: https://github.com/dobbs/wiki-tls
See also http://local-farm.wiki.dbbs.co for many more details.
### Get acquainted with wiki.
Launch the container:
@ -29,34 +34,26 @@ docker run -p 3000:3000 -it --rm \
Visit http://localhost:3000
### Make your wiki a local farm
We're going to use http://localtest.me instead of localhost for our
domain name. See http://readme.localtest.me for more info.
Let's also use a different volume for this one:
``` bash
docker volume create localtest.me
```
Specify the domain name when you launch your wiki
``` bash
docker run -p 3000:3000 -it --rm \
-v localtest.me:/home/app/.wiki \
-e DOMAIN=localtest.me \
dobbs/farm
```
Open http://this.localtest.me:3000 in one tab.
Open http://that.localtest.me:3000 in another.
# Development
This image's tag matches the version of the included wiki software.
This image's tag does not match the version of the included wiki software.
Notes to self:
``` bash
git tag -am "" '0.13.0'
docker build --tag dobbs/farm:0.51.0 .
git tag -am "" '0.51.0'
git push --tags
```
The repos in Dockerhub and GitHub are configured to automatically build new tags.
# Publish experimental plugins
``` bash
docker build \
--tag dobbs/farm:0.14.0-frame \
--build-arg WIKI_PACKAGE='dobbs/wiki#frame' \
.
docker push dobbs/farm:0.14.0-frame
```

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