Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
76280f3e7b | |||
356afda8a7 | |||
e9bd94e860 | |||
b0be20f5f3 | |||
26329ee584 | |||
e37d746c69 | |||
86548c594a | |||
ef34fdc759 |
13
Dockerfile
13
Dockerfile
@ -1,19 +1,20 @@
|
|||||||
FROM node:4-slim
|
FROM node:8-slim
|
||||||
|
|
||||||
RUN useradd --create-home app \
|
RUN useradd --create-home app \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
jq
|
jq \
|
||||||
|
git
|
||||||
WORKDIR /home/app
|
WORKDIR /home/app
|
||||||
ARG WIKI_PACKAGE=wiki@0.12.1
|
ARG WIKI_PACKAGE=wiki@0.16.2
|
||||||
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"]
|
||||||
|
47
README.md
47
README.md
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
http://fed.wiki.org
|
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.
|
### Get acquainted with wiki.
|
||||||
|
|
||||||
Launch the container:
|
Launch the container:
|
||||||
@ -29,31 +34,25 @@ docker run -p 3000:3000 -it --rm \
|
|||||||
|
|
||||||
Visit http://localhost:3000
|
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
|
# Development
|
||||||
|
|
||||||
|
This image's tag does not match the version of the included wiki software.
|
||||||
|
|
||||||
|
Notes to self:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
VERSION=0.12.0
|
git tag -am "" '0.50.0'
|
||||||
docker build --build-arg VERSION=$VERSION -t dobbs/farm:$VERSION .
|
git push --tags
|
||||||
git tag -am "" $VERSION
|
```
|
||||||
|
|
||||||
|
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
|
||||||
```
|
```
|
||||||
|
@ -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
|
Reference in New Issue
Block a user