Compare commits
	
		
			23 Commits
		
	
	
		
			1.0.9-wiki
			...
			1.0.28-tes
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d4aa21b680 | |||
| 4c286521eb | |||
| 9e349de285 | |||
| 6d356d4af6 | |||
| 8bbf4369cd | |||
| 7dddc84ff0 | |||
| cbc0d0a5d7 | |||
| 20329546d2 | |||
| d7892255ee | |||
| f2053f9314 | |||
| 00be948c9b | |||
| 0f45783feb | |||
| 8645ae54f8 | |||
| 6eea65be60 | |||
| 6eb8631f9e | |||
| 502d6ccec7 | |||
| cb3aa63370 | |||
| e59495665c | |||
| fb79fe0dc8 | |||
| bd2619a14b | |||
| 54f1c382f5 | |||
| 218128db23 | |||
| 6f9ed1279c | 
							
								
								
									
										14
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										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 | ||||
							
								
								
									
										32
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -4,16 +4,32 @@ RUN apk add --update --no-cache \ | ||||
|   dumb-init \ | ||||
|   git \ | ||||
|   jq | ||||
|  | ||||
| WORKDIR "/home/node" | ||||
| ARG WIKI_PACKAGE=wiki@0.23 | ||||
| ARG WIKI_CLIENT=wiki-client@0.23.0 | ||||
| RUN su node -c "npm install -g --prefix . $WIKI_PACKAGE" \ | ||||
|  && su node -c "cd /home/node/lib/node_modules/wiki & npm install --save $WIKI_CLIENT" | ||||
| RUN su node -c "mkdir -p .wiki" | ||||
| VOLUME "/home/node/.wiki" | ||||
| EXPOSE 3000 | ||||
|  | ||||
| ARG WIKI_PACKAGE=wiki@0.37.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/wiki-cafe/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"] | ||||
|  | ||||
							
								
								
									
										43
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								README.md
									
									
									
									
									
								
							| @ -7,7 +7,7 @@ Start Playing Federated Wiki: http://start.fed.wiki | ||||
|     docker run -p 3000:3000 -it --rm \ | ||||
|       dobbs/farm | ||||
|  | ||||
| Visit http://localhost:3000 and http://anything.localtest.me:3000 | ||||
| Visit http://localhost:3000 and http://anything.localhost:3000 | ||||
|  | ||||
| ### Run a local wiki that will survive a reboot | ||||
|  | ||||
| @ -26,27 +26,36 @@ devops pipeline. | ||||
| Testing new images locally: | ||||
|  | ||||
| ``` bash | ||||
| IMAGE=dobbs/farm:1.0.7-pre-22 | ||||
| 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 | ||||
| export IMAGE=dobbs/farm:1.0.7-pre-22 | ||||
| docker build --tag $IMAGE . | ||||
| k3d image import $IMAGE --cluster wiki | ||||
| cd ./examples/k8s/ | ||||
| perl -pi -e 's{^(\s+image:\s*).*$}{\1 $ENV["IMAGE"]}' wiki.yaml | ||||
| kubectl apply -f wiki.yaml | ||||
| ``` | ||||
|  | ||||
| The repos in Dockerhub and GitHub are configured to automatically build new tags. | ||||
|  | ||||
| # Publish experimental plugins | ||||
|  | ||||
| Invoke Dockerhub and GitHub integration. | ||||
| ``` bash | ||||
| git tag -am "" '1.0.2-pre-0217' | ||||
| git push --atomic origin main '1.0.2-pre-0217' | ||||
| kubectl patch deployment.apps/wiki-deployment \ | ||||
|   --type='json' \ | ||||
|   -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"'$IMAGE'"}]' | ||||
| ``` | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	