Posts for: #Hosting

Banana Pi installation

Banana Pi in 2024?

Recently I needed a quick and easy way to mount an external disk with an ntfs file system and share it to the network.

So whatcha gonna do? Connect it to a server, mount it, create a samba share for it - done.

So I thought of my long forgotten Banana Pi M1 as it would an absolutely perfect little machine for the job. I am planning to turn it off most of the time, boot it up by wake-on-lan and auto-mount and share the external disk, which automatically goes into standby when nothing is happening with it. The perfect scenario.

Read more

Hands Off Updating Docker Containers

In this article I want to paste a code snippet which is checking it’s filtered subfolders for docker-compose files and pulls and ups automagically.

Here it is!

#!/bin/bash

# our docker base folder
DOCKER_BASE_DIR="/home/user/docker"
# folders to exclude from udpate
DIRS_TO_EXCLUDE=("code" "snacklish" "nginx-proxy" "psono")
# docker-compose binary location
DC=$(which docker-compose)

cd ${DOCKER_BASE_DIR}
for D in *; do
    # if is directory and not excluded
    if ([ -d "${D}" ] && [[ ! " ${DIRS_TO_EXCLUDE[@]} " =~ " ${D} " ]]); then
        cd ${D}
        echo "I am in $(pwd)"
        if [ -f "./docker-compose.yaml" ]; then
            echo "I found a docker-compose.yaml, updating ..."
            ${DC} pull && ${DC} up -d && cd ..
        else
            echo "No docker-compose.yaml found, stepping back"
            cd ..
        fi
    fi
done

Oriented on Selenium acceptance tests, I have designed the output to be as readable and as debuggable as possible.

Read more

Local Emby vs. Jellyfin hosting with docker

Set up Jellyfin and Emby - docker-compose

I am showing how Emby and Jellyfin can be hosted locally with docker and what to expect from it.

First I need two docker-compose.yaml files, one for Jellyfin:

Also Dockerhub

version: "3"

services:
  jellyfin:
    image: "jellyfin/jellyfin:latest"
    container_name: jellyfin
    user: 1000:1000
    restart: unless-stopped
    ports:
      - 8097:8096
    volumes:
      - ./config:/config
      - ./cache:/cache
      - ./media:/media
      # - ./media/share1:/mnt/movies
      # - ./media/share2:/mnt/music

And one for Emby:

Read more

Find the Htaccess Location

Especially when working on foreign systems/servers it might be hard to determine where the .htpasswd file would go if you need an access restricted area while developing the website without taking the server offline.

Here is a short PHP script on how to find it:

*Info: Save this as findHtPasswd.php and run it on the host like https://this.host.com/findHtPasswd.php, copy the code and create a simple .htaccess file pointing to the correct location.

Read more