12 Commits

2 changed files with 38 additions and 6 deletions

14
.drone.yml Normal file

@ -0,0 +1,14 @@
---
kind: pipeline
name: publish docker image
steps:
- name: build and publish
image: plugins/docker
settings:
username: 3wordchant
password:
from_secret: git_coopcloud_tech_token_3wc
repo: git.coopcloud.tech/wiki-cafe/wiki-farm
auto_tag: true
tags: latest
registry: git.coopcloud.tech

@ -4,14 +4,32 @@ RUN apk add --update --no-cache \
dumb-init \ dumb-init \
git \ git \
jq jq
WORKDIR "/home/node" WORKDIR "/home/node"
ARG WIKI_PACKAGE=wiki@0.28.0
RUN su node -c "npm install -g --prefix . $WIKI_PACKAGE" ARG WIKI_PACKAGE=wiki@0.37.0
RUN su node -c "mkdir -p .wiki"
VOLUME "/home/node/.wiki"
EXPOSE 3000
USER node USER node
RUN npm install -g --prefix . $WIKI_PACKAGE
RUN cd lib/node_modules/wiki/node_modules && \
rm -r wiki-security-passportjs && \
git clone https://git.coopcloud.tech/3wordchant/wiki-security-passportjs.git
RUN cd lib/node_modules/wiki/node_modules/wiki-security-passportjs && \
npm install && \
node_modules/grunt/bin/grunt
RUN mkdir -p .wiki
VOLUME "/home/node/.wiki"
EXPOSE 3000
ENV PATH="${PATH}:/home/node/bin" ENV PATH="${PATH}:/home/node/bin"
ENV NPM_CONFIG_PREFIX="${HOME}" ENV NPM_CONFIG_PREFIX="${HOME}"
ENTRYPOINT ["dumb-init"] ENTRYPOINT ["dumb-init"]
CMD ["wiki", "--farm", "--security_type=friends"]
CMD ["wiki", "--farm"]