Tag Archives: docker

Immich and (not) Google Timeline

Google killed timeline.

I’ve been experimenting in the past with GPS (gpx) mappers and alternatives.

Now I’ve installed Dawarich, which can use the photos in my immich library.

https://dawarich.app

Spin up a docker instance, create an API key in immich, and GO.

I’ve imported google’s timeline.json from my phone.

Auto post locations to your instance API using:

Testing software for a paperless office.

I always wanted to have everything on my fileserver. But indexing or searching for the right document is a pain in the *ss.

I wrote several tools for this but wanted to try something new.

Maybe its a perfect solution for all my datasheets I use in my electronics as well.

So I installed Paperless-ngx using docker.

Paperless-ngx is a community-supported open-source document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper.

Features

  • Organize and index your scanned documents with tags, correspondents, types, and more.
  • Your data is stored locally on your server and is never transmitted or shared in any way.
  • Performs OCR on your documents, adding searchable and selectable text, even to documents scanned with only images.
  • Utilizes the open-source Tesseract engine to recognize more than 100 languages.
  • Documents are saved as PDF/A format which is designed for long term storage, alongside the unaltered originals.
  • Uses machine-learning to automatically add tags, correspondents and document types to your documents.
  • Supports PDF documents, images, plain text files, Office documents (Word, Excel, PowerPoint, and LibreOffice equivalents) and more.
  • Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely with different configurations assigned to different documents.
  • Beautiful, modern web application that features:
    • Customizable dashboard with statistics.
    • Filtering by tags, correspondents, types, and more.
    • Bulk editing of tags, correspondents, types and more.
    • Drag-and-drop uploading of documents throughout the app.
    • Customizable views can be saved and displayed on the dashboard and / or sidebar.
    • Support for custom fields of various data types.
    • Shareable public links with optional expiration.
  • Full text search helps you find what you need:
    • Auto completion suggests relevant words from your documents.
    • Results are sorted by relevance to your search query.
    • Highlighting shows you which parts of the document matched the query.
    • Searching for similar documents (“More like this”)
  • Email processing: import documents from your email accounts:
    • Configure multiple accounts and rules for each account.
    • After processing, paperless can perform actions on the messages such as marking as read, deleting and more.
  • A built-in robust multi-user permissions system that supports ‘global’ permissions as well as per document or object.
  • A powerful workflow system that gives you even more control.
  • Optimized for multi core systems: Paperless-ngx consumes multiple documents in parallel.
  • The integrated sanity checker makes sure that your document archive is in good health.

I’ll keep adding to this page at a later time

Playing with my private search engine

Searx is a free and open-source metasearch engine, available under the GNU Affero General Public License version 3, with the aim of protecting the privacy of its users. To this end, Searx does not share users’ IP addresses or search history with the search engines from which it gathers results.

It’s easy to install using docker, but i wanted to add my own mysql server data. ( pipetune search engine data in below example )
There are many search plugins and quite hackable.
But there was a missing python module in a docker image.

ModuleNotFoundError: No module named ‘mysql’

So i build a new docker image based on the original

# Install docker and docker-compose

cd /usr/local
git clone https://github.com/searxng/searxng-docker.git
cd searxng-docker
Edit the .env file to set the hostname 
Generate the secret key sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml
Edit the searxng/settings.yml file according to your need
Check everything is working: docker-compose up
Run SearXNG in the background: docker-compose up -d

I’ve changed the docker-compose.yaml

Changed
<     image: searxng/searxng:latest

into 
>     build: .

And
changed the listen address
<      - "127.0.0.1:8080:8080"
into
>      - "8080:8080"

Created a Dockerfile

FROM searxng/searxng:latest
RUN pip install mysql-connector-python

Changed searxng/settings.yml

engines:
  - name: tunesdb
    engine: mysql_server
    host: 10.12.0.xx
    database: pipetunesearch
    username: xxxxxxx
    password: xxxxxxx
    limit: 50
    query_str: 'SELECT * from tunes WHERE tunename=%(query)s'

I could not use a like statement in de sql query .. have to look into that

    query_str: 'SELECT * from tunes WHERE tunename like %(query)%' .. doesn´t work

Example showing own data

To complete this post the reverse proxy info ..

<VirtualHost *:443>
   SSLEngine on
   SSLProxyEngine On

   SSLProtocol all -SSLv2 -SSLv3 +TLSv1
   SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:!RC4+RSA:+HIGH:+MEDIUM

   SSLCertificateFile wildcard.cer
   SSLCertificateKeyFile my.key
   SSLCertificateChainFile GlobalSignRootCA.cer
   SSLCertificateChainFile AlphaSSLCA-SHA256-G2.cer

   CustomLog /var/log/httpd/search_ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

    ServerAdmin webmaster@henriaanstoot.nl
    ServerName search.henriaanstoot.nl

ProxyRequests Off
ProxyPreserveHost On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off

<Location />
ProxyPass  http://dockerhostip:8080/
ProxyPassReverse  http://dockerhostip:8080/
</Location>

    ErrorLog /var/log/httpd/search.henriaanstoot.nl-error.log
    CustomLog /var/log/httpd/search.henriaanstoot.nl-access.log combined
</VirtualHost>

Add packages to a pre-existing docker image

A little test building a custom docker image, for a friend.

Q: I have a Node-red docker, but without ffmpeg binary

Using below code, i’ve added a overlay with ffmpeg.
Podman command’s should be working for docker command also.
(Note: When adding multiple packages OR other commands, try to use a single commandline, Every RUN command adds a overlay.

mkdir noderedbuild
cd  noderedbuild
vi Dockerfile
FROM nodered/node-red
LABEL description="Custom Nodered Build"
MAINTAINER haanstoot <fash@fash.nu>
USER root
RUN apk add  --no-cache ffmpeg
EXPOSE 1880

Below builds a local image named nodered:v1
NOTE: docker run command may be incomplete for Node-Red, this was just a example to add packages

podman build -t nodered:v1 .    
podman images
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered localhost/nodered:v1 -d

Tested with

[root@podman ~]# podman exec -it mynodered /bin/bash
bash-5.0# ffmpeg
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers

Usage:

https://flows.nodered.org/flow/127b038961f873d1babeecaf5578959e

RTSP Frame save in Node-Red