15 Commits

Author SHA1 Message Date
3wc
6d356d4af6 auto_tag: true
[ci skip]
2023-12-05 14:43:19 -03:00
3wc
8bbf4369cd Reinstate unwelcome manual Grunt step
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-17 21:42:30 +00:00
3wc
7dddc84ff0 Drop forked node-oauth, upgrade to wiki 0.31
All checks were successful
continuous-integration/drone Build is passing
2023-11-17 21:29:06 +00:00
3wc
cbc0d0a5d7 Install forked version of node-oauth to fix OAuth2
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-07 19:15:14 -08:00
3wc
20329546d2 Switch to git.coopcloud.tech URL 2022-12-07 16:59:14 -08:00
3wc
d7892255ee Restore previous YOLOing-patched-wiki-security-passportjs
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 19:29:54 -08:00
3wc
f2053f9314 Fix repo setting to fix Docker build?
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-22 13:26:32 -08:00
3wc
00be948c9b Try flipping settings order to fix registry
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-22 13:25:02 -08:00
3wc
0f45783feb Set custom registry for docker build
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-22 13:18:55 -08:00
3wc
8645ae54f8 Automatically build images using Drone
Some checks failed
continuous-integration/drone Build is failing
2022-11-22 12:42:56 -08:00
6eea65be60 lower the k8s experiment instructions on the pages
The change in README aims to make the tagging, building, publishing
instructions together as an offer for docker savvy folks to take
control of their own docker images and publishing flows.

Also expecting a bump in versions to bring in a patch update to
wiki-client
2022-10-05 11:52:13 -06:00
6eb8631f9e add add'l docker build instructions 2022-09-24 11:33:15 -06:00
502d6ccec7 add add'l docker build instructions 2022-09-24 11:22:42 -06:00
cb3aa63370 upgrade to wiki 0.28.0 2022-09-24 11:13:27 -06:00
e59495665c upgrade to wiki 0.27.0 2021-11-23 20:55:33 -07:00
3 changed files with 59 additions and 21 deletions

14
.drone.yml Normal file
View 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

View File

@ -4,14 +4,32 @@ RUN apk add --update --no-cache \
dumb-init \
git \
jq
WORKDIR "/home/node"
ARG WIKI_PACKAGE=wiki@0.25.0
RUN su node -c "npm install -g --prefix . $WIKI_PACKAGE"
RUN su node -c "mkdir -p .wiki"
VOLUME "/home/node/.wiki"
EXPOSE 3000
ARG WIKI_PACKAGE=wiki@0.31.0
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 NPM_CONFIG_PREFIX="${HOME}"
ENTRYPOINT ["dumb-init"]
CMD ["wiki", "--farm", "--security_type=friends"]
CMD ["wiki", "--farm"]

View File

@ -26,11 +26,31 @@ devops pipeline.
Testing new images locally:
``` bash
TAG=1.0.8-prefer-title
TAG=1.0.14-prefer-title
IMAGE=dobbs/farm:$TAG
docker build --tag $IMAGE .
```
# Publish containers
GitHub
``` bash
git tag -am "" "$TAG"
git push --atomic origin main "$TAG"
```
Docker Hub
``` bash
docker build --tag $IMAGE . # if you haven't already
docker build --tag dobbs/farm:latest . # if you haven't already
docker push $IMAGE
docker push dobbs/farm:latest
```
# Experiment with K8S
With the local kubernetes example (see [examples/k8s/README.md](./examples/k8s/README.md)):
``` bash
@ -39,17 +59,3 @@ kubectl patch deployment.apps/wiki-deployment \
--type='json' \
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"'$IMAGE'"}]'
```
# Publish containers with experimental code
GitHub
``` bash
git tag -am "" "$TAG"
git push --atomic origin main "$TAG"
```
Docker Hub
``` bash
docker push $IMAGE
```