mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-16 03:06:28 +00:00
Merge branch 'geek-cookbook:master' into master
This commit is contained in:
BIN
.cache/Ubuntu.400.ttf
Normal file
BIN
.cache/Ubuntu.400.ttf
Normal file
Binary file not shown.
BIN
.cache/Ubuntu.700.ttf
Normal file
BIN
.cache/Ubuntu.700.ttf
Normal file
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
#FROM squidfunk/mkdocs-material
|
||||
FROM ghcr.io/squidfunk/mkdocs-material-insiders
|
||||
ARG FROM_SOURCE=squidfunk/mkdocs-material
|
||||
FROM ${FROM_SOURCE}
|
||||
|
||||
RUN pip install \
|
||||
mkdocs-autolinks-plugin \
|
||||
mkdocs-htmlproofer-plugin \
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
[linx]: /recipes/linx/
|
||||
[mealie]: /recipes/mealie/
|
||||
[mylar]: /recipes/autopirate/mylar/
|
||||
[nightscout]: /recipes/nightscout/
|
||||
[nzbget]: /recipes/autopirate/nzbget/
|
||||
[nzbhydra]: /recipes/autopirate/nzbhydra/
|
||||
[ombi]: /recipes/autopirate/ombi/
|
||||
|
||||
@@ -8,12 +8,12 @@ Continue through the list of tools below, adding whichever tools your want to us
|
||||
* [Lazy Librarian](/recipes/autopirate/lazylibrarian/)
|
||||
* [Lidarr](/recipes/autopirate/lidarr/)
|
||||
* [Mylar](/recipes/autopirate/mylar/)
|
||||
* [NZBGet](/recipes/autopirate/nzbget.md)
|
||||
* [NZBGet](/recipes/autopirate/nzbget/)
|
||||
* [NZBHydra](/recipes/autopirate/nzbhydra/)
|
||||
* [Ombi](/recipes/autopirate/ombi/)
|
||||
* [Radarr](/recipes/autopirate/radarr/)
|
||||
* [RTorrent](/recipes/autopirate/rtorrent/)
|
||||
* [SABnzbd](/recipes/autopirate/sabnzbd.md)
|
||||
* [SABnzbd](/recipes/autopirate/sabnzbd/)
|
||||
* [Sonarr](/recipes/autopirate/sonarr/)
|
||||
* [End](/recipes/autopirate/end/) (launch the stack)
|
||||
|
||||
|
||||
@@ -8,13 +8,12 @@ hide:
|
||||
|
||||
Recipe | Description | Date
|
||||
-------------------------|------------------------------------------------------------------------------------------------------------------|--------------
|
||||
[NightScout][nightscout] | Share your CGM :drop_of_blood: data, setup advanced alarms and charts, for improved diabetes treatment :syringe: and quality-of-life :runner: | _9 Aug 2021_
|
||||
[Mealie][mealie] | Delicious, API-driven recipe manager, able to scrape-and-import recipes from a URL :cook: | _4 Feb 2021_
|
||||
[Funkwhale][funkwhale] | Enjoy, share, and federate your music in your own funky "pod". Think "Mastodon for Music" :whale: :musical_note: | _28 Jan 2021_
|
||||
[CyberChef][cyberchef] | A web-based collection of useful tools for INFOSEC work, by the [GCHQ](https://en.wikipedia.org/wiki/GCHQ) | _19 Jan 2021_
|
||||
[Linx][linx] | Quickly and securely share media/files with optional password-protection and expiry | _13 Jan 2021_
|
||||
[Komga][komga] | Beautiful interface to manage and enjoy your comics / graphic novels | _5 Jan 2021_
|
||||
[Photoprism][photoprism] | Self-hosted photo-management app incorporating automated tagging using Tensorflow | _6 Aug 2020_
|
||||
|
||||
|
||||
## Recent updates
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ GEM
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.6.0)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
colorize (0.8.1)
|
||||
concurrent-ruby (1.1.6)
|
||||
ethon (0.12.0)
|
||||
@@ -30,7 +30,7 @@ GEM
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
parallel (1.17.0)
|
||||
public_suffix (3.0.3)
|
||||
public_suffix (4.0.6)
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (1.3.1)
|
||||
ethon (>= 0.9.0)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
---
|
||||
description: While having a self-healing, scalable docker swarm is great for availability and scalability, none of that is worth a sausage if nobody can connect to your cluster!
|
||||
---
|
||||
|
||||
# Keepalived
|
||||
|
||||
While having a self-healing, scalable docker swarm is great for availability and scalability, none of that is any good if nobody can connect to your cluster.
|
||||
While having a self-healing, scalable docker swarm is great for availability and scalability, none of that is worth a sausage if nobody can connect to your cluster!
|
||||
|
||||
In order to provide seamless external access to clustered resources, regardless of which node they're on and tolerant of node failure, you need to present a single IP to the world for external access.
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ staticClients:
|
||||
name: 'example.com'
|
||||
secret: bar
|
||||
|
||||
enablePasswordDB: true
|
||||
|
||||
staticPasswords:
|
||||
- email: "admin@example.com"
|
||||
# bcrypt hash of the string "password"
|
||||
@@ -197,4 +199,4 @@ What have we achieved? By adding an additional label to any service, we can secu
|
||||
|
||||
[^1]: You can remove the `whoami` container once you know Traefik Forward Auth is working properly
|
||||
|
||||
--8<-- "recipe-footer.md"
|
||||
--8<-- "recipe-footer.md"
|
||||
|
||||
@@ -22,11 +22,10 @@ To deal with these gaps, we need a front-end load-balancer, and in this design,
|
||||
Already deployed:
|
||||
|
||||
* [X] [Docker swarm cluster](/ha-docker-swarm/design/) with [persistent shared storage](/ha-docker-swarm/shared-storage-ceph.md)
|
||||
* [X] [Traefik](/ha-docker-swarm/traefik) configured per design
|
||||
* [X] DNS entry for the hostname you intend to use (*or a wildcard*), pointed to your [keepalived](/ha-docker-swarm/keepalived/) IP
|
||||
|
||||
New:
|
||||
|
||||
* [ ] Traefik configured per design
|
||||
* [ ] Access to update your DNS records for manual/automated [LetsEncrypt](https://letsencrypt.org/docs/challenge-types/) DNS-01 validation, or ingress HTTP/HTTPS for HTTP-01 validation
|
||||
|
||||
## Preparation
|
||||
@@ -86,7 +85,7 @@ Create `/var/data/traefikv2/traefik.toml` as follows:
|
||||
!!! tip
|
||||
"We'll want an overlay network, independent of our traefik stack, so that we can attach/detach all our other stacks (including traefik) to the overlay network. This way, we can undeploy/redepoly the traefik stack without having to bring down every other stack first!" - voice of hard-won experience
|
||||
|
||||
Create `/var/data/config/traefikv2/traefikv2.yml` as follows:
|
||||
Create `/var/data/config/traefik/traefik.yml` as follows:
|
||||
|
||||
```
|
||||
version: "3.2"
|
||||
@@ -115,6 +114,18 @@ networks:
|
||||
|
||||
--8<-- "premix-cta.md"
|
||||
|
||||
Create `/var/data/config/traefikv2/traefikv2.env` with the environment variables required by the provider you chose in the LetsEncrypt DNS Challenge section of `traefik.toml`. Full configuration options can be found in the [Traefik documentation](https://doc.traefik.io/traefik/https/acme/#providers). Route53 and CloudFlare examples are below.
|
||||
|
||||
```
|
||||
# Route53 example
|
||||
AWS_ACCESS_KEY_ID=<your-aws-key>
|
||||
AWS_SECRET_ACCESS_KEY=<your-aws-secret>
|
||||
|
||||
# CloudFlare example
|
||||
# CLOUDFLARE_EMAIL=<your-cloudflare-email>
|
||||
# CLOUDFLARE_API_KEY=<your-cloudflare-api-key>
|
||||
```
|
||||
|
||||
Create `/var/data/config/traefikv2/traefikv2.yml` as follows:
|
||||
|
||||
```yaml
|
||||
@@ -195,7 +206,7 @@ Likewise with the log file.
|
||||
First, launch the traefik stack, which will do nothing other than create an overlay network by running `docker stack deploy traefik -c /var/data/config/traefik/traefik.yml`
|
||||
|
||||
```
|
||||
[root@kvm ~]# docker stack deploy traefik -c traefik.yml
|
||||
[root@kvm ~]# docker stack deploy traefik -c /var/data/config/traefik/traefik.yml
|
||||
Creating network traefik_public
|
||||
Creating service traefik_scratch
|
||||
[root@kvm ~]#
|
||||
@@ -204,8 +215,8 @@ Creating service traefik_scratch
|
||||
Now deploy the traefik application itself (*which will attach to the overlay network*) by running `docker stack deploy traefikv2 -c /var/data/config/traefikv2/traefikv2.yml`
|
||||
|
||||
```
|
||||
[root@kvm ~]# docker stack deploy traefik-app -c traefikv2.yml
|
||||
Creating service traefikv2_app
|
||||
[root@kvm ~]# docker stack deploy traefikv2 -c /var/data/config/traefikv2/traefikv2.yml
|
||||
Creating service traefikv2_traefikv2
|
||||
[root@kvm ~]#
|
||||
```
|
||||
|
||||
|
||||
BIN
manuscript/images/nightscout.png
Normal file
BIN
manuscript/images/nightscout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
BIN
manuscript/images/nightscout_screenshot_600.png
Normal file
BIN
manuscript/images/nightscout_screenshot_600.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
@@ -4,7 +4,7 @@
|
||||
|
||||
1. Necessary docker-compose and env files for all published recipes
|
||||
2. Ansible playbook for deploying the cookbook stack, as well as individual recipes
|
||||
3. Helm charts for deploying deploying recipes into Kubernetes
|
||||
3. Helm charts for deploying recipes into Kubernetes
|
||||
|
||||
The intention of Premix is that sponsors can launch any recipe with just a `git pull` followed by `ansible-playbook ...` (*Docker Swarm _or_ Kubernetes*), `docker stack deploy ...` (*Docker Swarm*), or `helm install ...` (*Kubernetes*).
|
||||
|
||||
@@ -607,4 +607,4 @@ Here's a sample of the directory structure:
|
||||
└── wetty.yml
|
||||
|
||||
166 directories, 422 files
|
||||
```
|
||||
```
|
||||
|
||||
@@ -12,7 +12,7 @@ SABnzbd is the workhorse of the stack. It takes .nzb files as input (_manually o
|
||||
## Inclusion into AutoPirate
|
||||
|
||||
To include SABnzbd in your [AutoPirate](/recipes/autopirate/) stack
|
||||
(_The only reason you **wouldn't** use SABnzbd, would be if you were using [NZBGet](/recipes/autopirate/nzbget.md) instead_), include the following in your autopirate.yml stack definition file:
|
||||
(_The only reason you **wouldn't** use SABnzbd, would be if you were using [NZBGet](/recipes/autopirate/nzbget/) instead_), include the following in your autopirate.yml stack definition file:
|
||||
|
||||
--8<-- "premix-cta.md"
|
||||
|
||||
|
||||
@@ -21,10 +21,7 @@ Existing:
|
||||
We'll need several directories to bind-mount into our runner containers, so create them in `/var/data/gitlab`:
|
||||
|
||||
```
|
||||
cd /var/data
|
||||
mkdir gitlab
|
||||
cd gitlab
|
||||
mkdir -p {runners/1,runners/2}
|
||||
mkdir -p /var/data/gitlab/runners/{1,2}
|
||||
```
|
||||
|
||||
### Setup Docker Swarm
|
||||
@@ -88,9 +85,7 @@ check_interval = 0
|
||||
|
||||
### Launch runners
|
||||
|
||||
Launch the mail server stack by running `docker stack deploy gitlab-runner -c <path -to-docker-compose.yml>`
|
||||
|
||||
Log into your new instance at https://**YOUR-FQDN**, with user "root" and the password you specified in gitlab.env.
|
||||
Launch the GitLab Runner stack by running `docker stack deploy gitlab-runner -c <path -to-docker-compose.yml>`
|
||||
|
||||
[^1]: You'll note that I setup 2 runners. One is locked to a single project (_this cookbook build_), and the other is a shared runner. I wanted to ensure that one runner was always available to run CI for this project, even if I'd tied up another runner on something heavy-duty, like a container build. Customize this to your use case.
|
||||
[^2]: Originally I deployed runners in the same stack as GitLab, but I found that they would frequently fail to start properly when I launched the stack. I think that this was because the runners started so quickly (_and GitLab starts **sooo** slowly!_), that they always started up reporting that the GitLab instance was invalid or unavailable. I had issues with CI builds stuck permanently in a "pending" state, which were only resolved by restarting the runner. Having the runners deployed in a separate stack to GitLab avoids this problem.
|
||||
|
||||
166
manuscript/recipes/nightscout.md
Normal file
166
manuscript/recipes/nightscout.md
Normal file
@@ -0,0 +1,166 @@
|
||||
# Nightscout
|
||||
|
||||
Nightscout is "*...an open source, DIY project that allows real time access to a CGM data via personal website, smartwatch viewers, or apps and widgets available for smartphones*"
|
||||
|
||||
!!! question "Yeah, but what's a CGM?"
|
||||
A CGM is a "continuos glucose monitor" :drop_of_blood: - If you have a blood-sugar-related disease (*i.e. diabetes*), you might wear a CGM in order to retrieve blood-glucose level readings, to inform your treatment.
|
||||
|
||||
NightScout frees you from the CGM's supplier's limited and proprietary app, and unlocks advanced charting, alarming, and sharing features :muscle:
|
||||
|
||||
|
||||

|
||||
|
||||
[Nightscout](https://nightscout.github.io/) is _the_ standard for open-source CGM data collection, used by diabetics and those who love them, to store, share, and retrieve blood-glocuse data, in order to live healthier and happier lives. It's used as the data sharing/syncing backend for all the popular smartphone apps, including [xDrip+](https://github.com/NightscoutFoundation/xDrip) (*Android*) and [Spike App](https://spike-app.com/) (*iOS*).
|
||||
|
||||
Most NightScout users will deploy to Heroko, using MongoDB Atlas, which is a [well-documented solution](https://nightscout.github.io/nightscout/new_user/). If you wanted to run NightScout on your own Docker stack though, then this recipe is for you!
|
||||
|
||||
--8<-- "recipe-standard-ingredients.md"
|
||||
|
||||
## Preparation
|
||||
|
||||
### Setup data locations
|
||||
|
||||
First we create a directory to hold Nightscout's database, as well as database backups:
|
||||
```
|
||||
mkdir -p /var/data/runtime/nightscout/database # excluded from automated backups
|
||||
mkdir -p /var/data/nightscout/database # included in automated backups
|
||||
```
|
||||
|
||||
### Create env file
|
||||
|
||||
NightScout is configured entirely using environment variables, so create something like this as `/var/data/config/nightscout/nightscout.env`:
|
||||
|
||||
!!! warning
|
||||
Your variables may vary significantly from what's illustrated below, and it's best to read up and understand exactly what each option does.
|
||||
|
||||
```yaml
|
||||
# Customize these per https://github.com/nightscout/cgm-remote-monitor/blob/master/README.md#environment
|
||||
|
||||
# Required
|
||||
MONGODB_URI=mongodb://db
|
||||
API_SECRET=myverysecritsecrit
|
||||
DISPLAY_UNITS=mmol # set to "mg/dl" if you're using US-style measurements
|
||||
BASE_URL=https://nightscout.example.com
|
||||
|
||||
# We rely on traefik to handle SSL, so don't bother using in in nightscout
|
||||
INSECURE_USE_HTTP=true
|
||||
|
||||
# Listen on all interfaces
|
||||
HOSTNAME=::
|
||||
|
||||
# # Features
|
||||
ENABLE=careportal basal dbsize rawbg iob maker bridge cob bwp cage iage sage boluscalc pushover treatmentnotify mmconnect loop pump profile food openaps bage alexa override cors
|
||||
# DISABLE=
|
||||
AUTH_DEFAULT_ROLES=denied
|
||||
THEME=colors
|
||||
|
||||
# IMPORT_CONFIG=
|
||||
# TREATMENTS_AUTH=
|
||||
|
||||
# # Alarms
|
||||
# ALARM_TYPES=
|
||||
# BG_HIGH
|
||||
# BG_TARGET_TOP
|
||||
# BG_TARGET_BOTTOM
|
||||
# BG_LOW
|
||||
# ALARM_URGENT_HIGH
|
||||
# ALARM_URGENT_HIGH_MINS
|
||||
# ALARM_HIGH
|
||||
# ALARM_HIGH_MINS
|
||||
# ALARM_LOW
|
||||
# ALARM_LOW_MINS
|
||||
# ALARM_URGENT_LOW
|
||||
# ALARM_URGENT_LOW_MINS
|
||||
# ALARM_URGENT_MINS
|
||||
# ALARM_WARN_MINS
|
||||
|
||||
# # Core
|
||||
# MONGO_TREATMENTS_COLLECTION=treatments
|
||||
|
||||
# Mongodb specific database dump details
|
||||
BACKUP_NUM_KEEP=7
|
||||
BACKUP_FREQUENCY=1d
|
||||
|
||||
```
|
||||
|
||||
### Setup Docker Swarm
|
||||
|
||||
Create a docker swarm config file in docker-compose syntax (v3), something like this:
|
||||
|
||||
--8<-- "premix-cta.md"
|
||||
|
||||
!!! tip
|
||||
I'm keen to share any and all resources I have with diabetics or loved-ones of diabetics (*of which I am one*). [Contact me](https://www.funkypenguin.co.nz/contact/) directly for details!
|
||||
|
||||
```yaml
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
|
||||
app:
|
||||
image: nightscout/cgm-remote-monitor
|
||||
networks:
|
||||
- internal
|
||||
- traefik_public
|
||||
env_file: /var/data/config/nightscout/nightscout.env
|
||||
deploy:
|
||||
labels:
|
||||
# traefik
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik_public
|
||||
|
||||
# traefikv1
|
||||
- traefik.frontend.rule=Host:nightscout.example.com
|
||||
- traefik.port=1337
|
||||
|
||||
# traefikv2
|
||||
- "traefik.http.routers.nightscout.rule=Host(`nightscout.example.com`)"
|
||||
- "traefik.http.routers.nightscout.entrypoints=https"
|
||||
- "traefik.http.services.nightscout.loadbalancer.server.port=1337"
|
||||
|
||||
db:
|
||||
image: mongo:latest
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- /var/data/runtime/nightscout/database:/data/db
|
||||
|
||||
db-backup:
|
||||
image: mongo:latest
|
||||
env_file: /var/data/config/nightscout/nightscout.env
|
||||
volumes:
|
||||
- /var/data/nightscout/database-dump:/dump
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
sleep 2m
|
||||
while /bin/true; do
|
||||
mongodump -h db --gzip --archive=/dump/dump_\`date +%d-%m-%Y"_"%H_%M_%S\`.mongo.gz
|
||||
ls -tr /dump/dump_*.mongo.gz | head -n -"$$BACKUP_NUM_KEEP" | xargs -r rm
|
||||
sleep $$BACKUP_FREQUENCY
|
||||
done
|
||||
EOF'
|
||||
networks:
|
||||
- internal
|
||||
|
||||
networks:
|
||||
traefik_public:
|
||||
external: true
|
||||
internal:
|
||||
driver: overlay
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.16.4.0/24
|
||||
|
||||
```
|
||||
|
||||
## Serving
|
||||
|
||||
### Launch nightscout!
|
||||
|
||||
Launch the nightscout stack by running ```docker stack deploy nightscout -c <path -to-docker-compose.yml>```
|
||||
|
||||
|
||||
[^1]: Most of the time, you'll need an app which syncs to Nightscout, and these apps won't support OIDC auth, so this recipe doesn't take into account any sort of authentication using [Traefik Forward Auth](/ha-docker-swarm/traefik-forward-auth/). Instead, NightScout is secured entirely with your `API_SECRET` above (*although it is possible to add more users once you're an admin*)
|
||||
|
||||
--8<-- "recipe-footer.md"
|
||||
@@ -9,6 +9,7 @@ In order to avoid IP addressing conflicts as we bring swarm networks up/down, we
|
||||
| [Mail Server](https://geek-cookbook.funkypenguin.co.nz/recipes/mail/) | 172.16.1.0/24 |
|
||||
| [Gitlab](https://geek-cookbook.funkypenguin.co.nz/recipes/gitlab/) | 172.16.2.0/24 |
|
||||
| [Wekan](https://geek-cookbook.funkypenguin.co.nz/recipes/wekan/) | 172.16.3.0/24 |
|
||||
| [NightScout](https://geek-cookbook.funkypenguin.co.nz/recipes/nightscout/) | 172.16.4.0/24 |
|
||||
| [Tiny Tiny RSS](https://geek-cookbook.funkypenguin.co.nz/recipes/tiny-tiny-rss/) | 172.16.5.0/24 |
|
||||
| [Huginn](https://geek-cookbook.funkypenguin.co.nz/recipes/huginn/) | 172.16.6.0/24 |
|
||||
| [Kanboard](https://geek-cookbook.funkypenguin.co.nz/recipes/kanboard/) | 172.16.8.0/24 |
|
||||
|
||||
6
mkdocs-insiders.yml
Normal file
6
mkdocs-insiders.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file exists for production builds where we use the mkdocs-material-insiders code, with exclusive features
|
||||
# that don't degrade for the open-source version
|
||||
INHERIT: mkdocs.yml
|
||||
# disabled for now, since I'm not convinced social cards are better than default thumbnails
|
||||
# plugins:
|
||||
# social: {}
|
||||
37
mkdocs.yml
37
mkdocs.yml
@@ -19,14 +19,14 @@ copyright: 'Copyright © 2016 - 2021 David Young, Funky Penguin Limited'
|
||||
|
||||
# Plugins
|
||||
plugins:
|
||||
- search
|
||||
- minify:
|
||||
minify_html: true
|
||||
- git-revision-date-localized:
|
||||
type: date
|
||||
- autolinks
|
||||
- macros:
|
||||
verbose: true
|
||||
search:
|
||||
minify:
|
||||
minify_html: true
|
||||
git-revision-date-localized:
|
||||
type: date
|
||||
autolinks:
|
||||
macros:
|
||||
verbose: true
|
||||
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ nav:
|
||||
- Linx: recipes/linx.md
|
||||
- Mealie: recipes/mealie.md
|
||||
- Minio: recipes/minio.md
|
||||
- NightScout: recipes/nightscout.md
|
||||
- OpenLDAP: recipes/openldap.md
|
||||
- OwnTracks: recipes/owntracks.md
|
||||
- Photoprism: recipes/photoprism.md
|
||||
@@ -187,7 +188,7 @@ theme:
|
||||
favicon: 'images/site-logo.svg'
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.instant
|
||||
# - navigation.instant
|
||||
- navigation.tabs.sticky
|
||||
- navigation.sections
|
||||
- search.suggest
|
||||
@@ -233,11 +234,21 @@ extra:
|
||||
- icon: 'material/mailbox'
|
||||
link: 'mailto:davidy@funkypenguin.co.nz?Subject=Hello%2C%20from%20a%20geek-cookbook%20reader%20%3B%29'
|
||||
generator: false
|
||||
consent:
|
||||
title: 'Would you like a cookie? 🍪'
|
||||
description: >
|
||||
|
||||
I know. cookies suck (<I>except the fresh, warm, choc-chip ones!</I>), and so does invasive tracking. Thing is, without cookies,
|
||||
analytics can't record your visit, and I can't work out where/how to invest time to make the cookbook better.
|
||||
|
||||
<p>So, with your consent, I'd like to record what you look at and where you're from, so that I can make the
|
||||
cookbook even better. My analytics are public - here's <A HREF='https://plausible.io/geek-cookbook.funkypenguin.co.nz' target="_blank">all</A> I know about you! - David</p>
|
||||
cookies:
|
||||
custom: Plausible Analytics
|
||||
analytics:
|
||||
provider: plausible
|
||||
data_domain: geek-cookbook.funkypenguin.co.nz
|
||||
|
||||
# Google Analytics
|
||||
google_analytics:
|
||||
- 'UA-139253-18'
|
||||
- 'auto'
|
||||
|
||||
# extra_css:
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block announce %}
|
||||
<style>.md-announce a,.md-announce a:focus,.md-announce a:hover{color:currentColor}.md-announce strong{white-space:nowrap}.md-announce .twitter{margin-left:.2em;color:#00acee}</style>
|
||||
<style>.md-banner a,.md-banner a:focus,.md-banner a:hover{color:currentColor}.md-banner strong{white-space:nowrap}.md-banner .twitter{margin-left:.2em;color:#00acee}</style>
|
||||
<div align="center">
|
||||
<a href="https://github.com/sponsors/funkypenguin">
|
||||
<span class="twemoji">
|
||||
@@ -25,14 +25,5 @@
|
||||
{% block analytics %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>
|
||||
</script>
|
||||
<!-- RightMessage
|
||||
<script type="text/javascript">
|
||||
(function(p, a, n, d, o, b, c) {
|
||||
o = n.createElement('script'); o.type = 'text/javascript'; o.async = true; o.src = 'https://tb.rightmessage.com/'+p+'.js';
|
||||
b = n.getElementsByTagName('script')[0]; d = function(h, u, i) { var c = n.createElement('style'); c.id = 'rmcloak'+i;
|
||||
c.type = 'text/css'; c.appendChild(n.createTextNode('.rmcloak'+h+'{visibility:hidden}.rmcloak'+u+'{display:none}'));
|
||||
b.parentNode.insertBefore(c, b); return c; }; c = d('', '-hidden', ''); d('-stay-invisible', '-stay-hidden', '-stay');
|
||||
setTimeout(o.onerror = function() { c.parentNode && c.parentNode.removeChild(c); }, a); b.parentNode.insertBefore(o, b);
|
||||
})('1802694484', 20000, document);
|
||||
</script> -->
|
||||
<script defer data-domain="geek-cookbook.funkypenguin.co.nz" src="https://plausible.io/js/plausible.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
1
overrides/partials/integrations/analytics/plausible.html
Normal file
1
overrides/partials/integrations/analytics/plausible.html
Normal file
@@ -0,0 +1 @@
|
||||
<script defer data-domain="{{ data_domain }}" src="https://plausible.io/js/plausible.js"></script>
|
||||
@@ -4,19 +4,18 @@
|
||||
# Fetch git history so that we get last-updated timestamps
|
||||
git fetch --unshallow
|
||||
|
||||
# Run python build script to check for errors
|
||||
python3 scripts/build.py mkdocs.yml
|
||||
|
||||
# install mkdocs (or insiders version, if we're passed a GH_TOKEN var)
|
||||
if [ -z "$GH_TOKEN" ]
|
||||
then
|
||||
pip install mkdocs-material
|
||||
mkdocs build -f mkdocs.yml
|
||||
else
|
||||
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
mkdocs build -f mkdocs-insiders.yml
|
||||
fi
|
||||
|
||||
# Run python build script
|
||||
python3 scripts/build.py mkdocs.yml
|
||||
|
||||
# Now build the docs for publishing
|
||||
mkdocs build -f mkdocs.yml
|
||||
|
||||
# Setup any necessary netlify redirects
|
||||
cp netlify_redirects.txt site/_redirects
|
||||
|
||||
3
scripts/serve-insiders.sh
Executable file
3
scripts/serve-insiders.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
docker build --build-arg FROM_SOURCE=ghcr.io/geek-cookbook/mkdocs-material-insiders . -t funkypenguin/mkdocs-material
|
||||
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material serve -f mkdocs-insiders.yml --dev-addr 0.0.0.0:8000 --dirtyreload
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
docker pull squidfunk/mkdocs-material:latest
|
||||
docker build . -t funkypenguin/mkdocs-material
|
||||
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material
|
||||
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material serve --dev-addr 0.0.0.0:8000 --dirtyreload
|
||||
Reference in New Issue
Block a user