Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
f85afce8c8 | |||
76280f3e7b | |||
356afda8a7 | |||
e9bd94e860 | |||
b0be20f5f3 | |||
26329ee584 | |||
e37d746c69 | |||
86548c594a | |||
ef34fdc759 | |||
e22b66240d | |||
e06405adc1 | |||
bc8204c9d3 |
20
Dockerfile
20
Dockerfile
@ -1,18 +1,20 @@
|
||||
FROM node:4-slim
|
||||
FROM node:10-alpine
|
||||
|
||||
RUN useradd --create-home app \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
jq
|
||||
RUN adduser -D -h /home/app app \
|
||||
&& apk add --update --no-cache \
|
||||
bash \
|
||||
jq \
|
||||
git
|
||||
WORKDIR /home/app
|
||||
RUN su app -c "npm install -g --prefix . wiki@0.11.4"
|
||||
ARG WIKI_PACKAGE=wiki@0.17.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"]
|
||||
|
36
README.md
36
README.md
@ -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,23 +34,26 @@ docker run -p 3000:3000 -it --rm \
|
||||
|
||||
Visit http://localhost:3000
|
||||
|
||||
### Make your wiki a local farm
|
||||
# Development
|
||||
|
||||
We're going to use http://localtest.me instead of localhost for our
|
||||
domain name. See http://readme.localtest.me for more info.
|
||||
This image's tag does not match the version of the included wiki software.
|
||||
|
||||
Notes to self:
|
||||
|
||||
Let's also use a different volume for this one:
|
||||
``` bash
|
||||
docker volume create localtest.me
|
||||
docker build --tag dobbs/farm:0.51.0 .
|
||||
git tag -am "" '0.51.0'
|
||||
git push --tags
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
The repos in Dockerhub and GitHub are configured to automatically build new tags.
|
||||
|
||||
Open http://this.localtest.me:3000 in one tab.
|
||||
Open http://that.localtest.me:3000 in another.
|
||||
# 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
|
||||
```
|
||||
|
@ -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
|
Reference in New Issue
Block a user