diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index dd031f6..2fb1105 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -1,4 +1,5 @@ mkdocs-material mkdocs-autolinks-plugin mkdocs-htmlproofer-plugin -mkdocs-git-revision-date-localized-plugin \ No newline at end of file +mkdocs-git-revision-date-localized-plugin +mkdocs-macros-plugin \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 556387d..652a72a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,5 @@ FROM ghcr.io/squidfunk/mkdocs-material-insiders RUN pip install \ mkdocs-autolinks-plugin \ mkdocs-htmlproofer-plugin \ - mkdocs-git-revision-date-localized-plugin + mkdocs-git-revision-date-localized-plugin \ + mkdocs-macros-plugin diff --git a/_snippets/convertkit-subscribe-form.html b/_snippets/convertkit-subscribe-form.html new file mode 100644 index 0000000..8a65adf --- /dev/null +++ b/_snippets/convertkit-subscribe-form.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/_snippets/premix-cta.md b/_snippets/premix-cta.md index 7f69d50..6c7cebe 100644 --- a/_snippets/premix-cta.md +++ b/_snippets/premix-cta.md @@ -1,4 +1,4 @@ -!!! tip +!!! tip inline end I share (_with my [sponsors](https://github.com/sponsors/funkypenguin)_) a private "[_premix_](https://geek-cookbook.funkypenguin.co.nz/premix/)" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a `git pull` and a `docker stack deploy` 👍. - 🚀 **Update**: Premix now includes an ansible playbook, so that sponsors can deploy an entire stack + recipes, with a single ansible command! (more [here](https://geek-cookbook.funkypenguin.co.nz/premix/ansible/operation/)) \ No newline at end of file + 🚀 **Update**: Premix now includes an ansible playbook, so that sponsors can deploy an entire stack + recipes, with a single ansible command! (*more [here](https://geek-cookbook.funkypenguin.co.nz/premix/ansible/operation/)*) \ No newline at end of file diff --git a/_snippets/recipe-footer.md b/_snippets/recipe-footer.md index f4bddac..1a5ee5b 100644 --- a/_snippets/recipe-footer.md +++ b/_snippets/recipe-footer.md @@ -10,7 +10,7 @@ Did you receive excellent service? Want to make your waiter happy? (_..and suppo Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the [RSS feed](https://mastodon.social/@geekcookbook_changes.atom), or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam) - +--8<-- "convertkit-subscribe-form.html" ## Your comments? 💬 diff --git a/manuscript/CHANGELOG.md b/manuscript/CHANGELOG.md index 4d7f0ec..2f55a5a 100644 --- a/manuscript/CHANGELOG.md +++ b/manuscript/CHANGELOG.md @@ -1,28 +1,31 @@ +--- +hide: + - navigation # Hide navigation +--- # CHANGELOG +## Recent additions + +Recipe | Description | Date +-----------------------------------|-------------------------------------------------------------------------------------|-------------- +[Linx](/recipes/linx/) | Quickly and securely share media/files with optional password-protection and expiry | _13 Jan 2021_ +[Komga](/recipes/komga/) | Beautiful interface to manage and enjoy your comics / graphic novels | _5 Jan 2021_ +[Photoprism](/recipes/photoprism/) | Self-hosted photo-management app incorporating automated tagging using Tensorflow | _6 Aug 2020_ + + +## Recent updates + +Recipe | Description | Date +---------------------------------------------------------------|---------------------------------------|-------------- +[Traefik Forward Auth](/ha-docker-swarm/traefik-forward-auth/) | Now uses for latest @thomseddon image | _11 Jun 2020_ + + ## Subscribe to updates - - +--8<-- "convertkit-subscribe-form.html" Also available via: * Mastodon: https://mastodon.social/@geekcookbook_changes * RSS: https://mastodon.social/@geekcookbook_changes.rss * The #changelog channel in our [Discord server](http://chat.funkypenguin.co.nz) - -## Recently added recipes - -* Added recipe for [Komga](/recipes/komga/), a beautiful interface to manage and enjoy your comics / graphic novels (_5 Jan 2021_) -* Added recipe for [Photoprism](/recipes/photoprism/), self-hosted photo app incorporating automated tagging using Tensorflow (_6 Aug 2020_) -* Added recipe for [JellyFin](/recipes/jellyfin/), the [FOSS fork](https://www.linuxuprising.com/2018/12/jellyfin-free-software-emby-media.html#:~:text=The%20free%20software%20Emby%20fork,differences%20with%20the%20core%20developers.) of [Emby](/recipes/emby/) (_6 Aug 2020_) -* Added recipe for [Restic](/recipes/restic/), simple and secure backup solution with **huge** range of target platforms via rclone (_25 June 2020_) -* Added recipe for [Duplicati](/recipes/duplicati/), all-in-one backup solution with a handy GUI (_18 June 2020_) -* Overhauled [Ceph (Shared Storage)](/ha-docker-swarm/shared-storage-ceph/) recipe for Ceph Octopus (v15) (_25 May 2020_) - - -## Recent improvements - -* Updated [Traefik Forward Auth](/ha-docker-swarm/traefik-forward-auth/) for latest @thomseddon image (_11 Jun 2020_) -* Added recipe for [automated snapshots of Kubernetes Persistent Volumes](/kubernetes/snapshots/), instructions for using [Helm](/kubernetes/helm/), and recipe for deploying [Traefik](/kubernetes/traefik/), which completes the Kubernetes cluster design! (_9 Feb 2019_) -* Added detailed description (_and diagram_) of our [Kubernetes design](/kubernetes/design/), plus a [simple load-balancer design](kubernetes/loadbalancer/) to avoid the complexities/costs of permitting ingress access to a cluster (_7 Feb 2019_) \ No newline at end of file diff --git a/manuscript/extras/javascript/auto-expand-nav.js b/manuscript/extras/javascript/auto-expand-nav.js deleted file mode 100644 index 00c64e3..0000000 --- a/manuscript/extras/javascript/auto-expand-nav.js +++ /dev/null @@ -1,27 +0,0 @@ -document.addEventListener("DOMContentLoaded", function() { - load_navpane(); -}); - -function load_navpane() { - var width = window.innerWidth; - if (width <= 1200) { - return; - } - - var nav = document.getElementsByClassName("md-nav"); - for(var i = 0; i < nav.length; i++) { - if (typeof nav.item(i).style === "undefined") { - continue; - } - - if (nav.item(i).getAttribute("data-md-level") && nav.item(i).getAttribute("data-md-component")) { - nav.item(i).style.display = 'block'; - nav.item(i).style.overflow = 'visible'; - } - } - - var nav = document.getElementsByClassName("md-nav__toggle"); - for(var i = 0; i < nav.length; i++) { - nav.item(i).checked = true; - } -} \ No newline at end of file diff --git a/manuscript/extras/javascript/sortable-tables.js b/manuscript/extras/javascript/sortable-tables.js new file mode 100644 index 0000000..fadda78 --- /dev/null +++ b/manuscript/extras/javascript/sortable-tables.js @@ -0,0 +1,6 @@ +app.document$.subscribe(function() { + var tables = document.querySelectorAll("article table") + tables.forEach(function(table) { + new Tablesort(table) + }) + }) \ No newline at end of file diff --git a/manuscript/images/linx.png b/manuscript/images/linx.png new file mode 100644 index 0000000..f4c3c21 Binary files /dev/null and b/manuscript/images/linx.png differ diff --git a/manuscript/index.md b/manuscript/index.md index 77a8343..04735b6 100644 --- a/manuscript/index.md +++ b/manuscript/index.md @@ -6,8 +6,13 @@ hide: # Welcome, fellow geek :wave: +## What is this? + Funky Penguin's "**[Geek Cookbook](https://geek-cookbook.funkypenguin.co.nz)**" is a collection of how-to guides for establishing your own container-based self-hosting platform, using either [Docker Swarm](/ha-docker-swarm/design/) or [Kubernetes](/kubernetes/). +[Dive into Docker Swarm](/ha-docker-swarm/design/){: .md-button .md-button--primary} +[Kick it with Kubernetes](/kubernetes/){: .md-button} + Running such a platform enables you to run self-hosted tools such as [AutoPirate](/recipes/autopirate/) (*Radarr, Sonarr, NZBGet and friends*), [Plex](https://www.plex.tv/), [NextCloud](https://nextcloud.com/), and includes elements such as: * [Automatic SSL-secured access](/ha-docker-swarm/traefik/) to all services (*with LetsEncrypt*) diff --git a/manuscript/premix/ansible/design.md b/manuscript/premix/ansible/design.md index 4861f8d..bc8b945 100644 --- a/manuscript/premix/ansible/design.md +++ b/manuscript/premix/ansible/design.md @@ -40,7 +40,7 @@ config: # cloudflare_api_key: # if you're using route53 - AWS_ACCESS_KEY_ID: "{{ vault_config.traefik.aws_access_key_id }}" - AWS_SECRET_ACCESS_KEY: "{{ vault_config.traefik.aws_secret_access_key }}" + AWS_ACCESS_KEY_ID: {{ "{{ vault_config.traefik.aws_access_key_id }}" }} + AWS_SECRET_ACCESS_KEY: {{ "{{ vault_config.traefik.aws_secret_access_key }}" }} AWS_REGION: "" ``` \ No newline at end of file diff --git a/manuscript/recipes/linx.md b/manuscript/recipes/linx.md new file mode 100644 index 0000000..5feb98d --- /dev/null +++ b/manuscript/recipes/linx.md @@ -0,0 +1,99 @@ +# Linx + +Ever wanted to quickly share a screenshot, but don't want to use imgur, sign up for a service, or have your image tracked across the internet for all time? + +Want to privately share some log output with a password, or a self-destructing cat picture? + +{: loading=lazy } + +[Linx](https://github.com/andreimarcu/linx-server) is self-hosted file/media-sharing service, which features: + +- :white_check_mark: Display common filetypes (*image, video, audio, markdown, pdf*) +- :white_check_mark: Display syntax-highlighted code with in-place editing +- :white_check_mark: Documented API with keys for restricting uploads +- :white_check_mark: Torrent download of files using web seeding +- :white_check_mark: File expiry, deletion key, file access key, and random filename options + + +## Ingredients + +!!! summary "Ingredients" + 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 + + +## Preparation + +### Setup data locations + +First we create a directory to hold the data which linx will serve: + +``` +mkdir /var/data/linx +``` + +### Create config file + +Linx is configured using a flat text file, so create this on the Docker host, and then we'll mount it (*read-only*) into the container, below. + +``` +mkdir /var/data/config/linx +cat << EOF > /var/data/config/linx/linx.conf +# Refer to https://github.com/andreimarcu/linx-server for details +cleanup-every-minutes = 5 +EOF +``` + +### Setup Docker Swarm + +Create a docker swarm config file in docker-compose syntax (v3), something like this: + +--8<-- "premix-cta.md" + +``` +version: "3.2" # https://docs.docker.com/compose/compose-file/compose-versioning/#version-3 + +services: + linx: + image: andreimarcu/linx-server + env_file: /var/data/config/linx/linx.env + command: -config /linx.conf + volumes: + - /var/data/linx/:/files/ + - /var/data/config/linx/linx.conf:/linx.conf:ro + deploy: + labels: + # traefik common + - traefik.enable=true + - traefik.docker.network=traefik_public + + # traefikv1 + - traefik.frontend.rule=Host:linx.example.com + - traefik.port=8080 + + # traefikv2 + - "traefik.http.routers.linx.rule=Host(`linx.example.com`)" + - "traefik.http.routers.linx.entrypoints=https" + - "traefik.http.services.linx.loadbalancer.server.port=8080" + + networks: + - traefik_public + +networks: + traefik_public: + external: true +``` + +## Serving + +### Launch the Linx! + +Launch the Linx stack by running ```docker stack deploy linx -c