6 Commits

Author SHA1 Message Date
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
e37d746c69 upgrade to node-8 and to wiki-0.13.0 2017-12-11 08:02:50 -07:00
86548c594a upgrade to wiki 0.12.2
includes update to client and several plugins:
calendar, markdown, and html
2017-11-06 18:00:57 -07:00
ef34fdc759 enable github-based npm packages for WIKI_PACKAGE
npm needs git installed in order to install packages from github
2017-10-02 07:10:55 -06:00
e22b66240d enabled building scoped packages & bumped version to 0.12.1 2017-09-20 17:50:00 -06:00
3 changed files with 21 additions and 36 deletions

View File

@ -1,19 +1,20 @@
FROM node:4-slim
FROM node:8-slim
RUN useradd --create-home app \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
jq
jq \
git
WORKDIR /home/app
ARG VERSION=0.12.0
RUN su app -c "npm install -g --prefix . wiki@$VERSION"
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

@ -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,31 +34,15 @@ 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.
Notes to self:
``` bash
VERSION=0.12.0
docker build --build-arg VERSION=$VERSION -t dobbs/farm:$VERSION .
git tag -am "" $VERSION
git tag -am "" '0.14.0'
git push --tags
```
The repos in Dockerhub and GitHub are configured to automatically build new 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