I am a huge Docker fan and run my own home and cloud server with it.
“Docker is a platform that allows developers to create, deploy, and run applications in containers. Containers are lightweight, portable, and self-sufficient environments that can run an application and all its dependencies, making it easier to manage and deploy applications across different environments. Docker provides tools and services for building, shipping, and running containers, as well as a registry for storing and sharing container images.
With Docker, developers can package their applications as containers and deploy them anywhere, whether it’s on a laptop, a server, or in the cloud. Docker has become a popular technology for DevOps teams and has revolutionized the way applications are developed and deployed.”
I am always looking for new ways to document the tools I use. This might help others to find interesting projects to enhance their own work or hobby life :)
I will have multiple series of this kind. I am starting with Docker this week, as it is at the core / a hub for many things I do. I often testdrive things locally, before deploying them to the cloud.
I am not concentrating on the installation of Docker itself, there are so many articles about that out there. You will have no problem to find help articles or videos detailing it for your platform.
Docker Compose and Docker CLI (Command Line Interface) are two different tools provided by Docker, although they are often used together.
Docker CLI is a command-line interface tool that allows users to interact with Docker and manage Docker containers, images, and networks from the terminal. It provides a set of commands that can be used to create, start, stop, and manage Docker containers, as well as to build and push Docker images.
Docker Compose, on the other hand, is a tool for defining and running multi-container Docker applications. It allows users to define a set of services and their dependencies in a YAML file and then start and stop the entire application with a single command. Docker Compose also provides a way to manage the lifecycle of the containers as a group, including scaling up and down the number of containers.
I prefer the use of Docker Compose, as it makes it easy to replicate and tweak a setup between different servers.
There are tools like $composerize, which allow you to easily transform a CLI command into a composer file. Also a nice way to easily combine multiple commands into a clean configuration.
Portainer is an open-source container management tool that provides a web-based user interface for managing Docker environments. With Portainer, users can easily deploy and manage containers, images, networks, and volumes using a graphical user interface (GUI) instead of using the Docker CLI. Portainer also provides features for monitoring container and system metrics, creating and managing container templates, and configuring and managing Docker Swarm clusters.
Portainer is designed to be easy to use and to provide a simple and intuitive interface for managing Docker environments. It supports multiple Docker hosts and allows users to switch between them easily from the GUI. Portainer also provides role-based access control (RBAC) to manage user access and permissions, making it suitable for use in team environments.
Portainer can be installed as a Docker container and can be used to manage both local and remote Docker environments. It is available in two versions: Portainer CE (Community Edition) and Portainer Business. Portainer CE is free and open-source, while Portainer Business provides additional features and support for enterprise users.
Portainer is my tool of choice, as it allows to create stacks. A stack is a collection of Docker services that are deployed and managed as a single entity. A stack is defined in a Compose file (in YAML format) that specifies the services and their configurations.
When a stack is deployed, Portainer creates the required containers, networks, and volumes and starts the services in the stack. Portainer also monitors the stack and its services, providing status updates and alerts in case of issues or failures.
As I said, its important for me to easily transfer a single container or stack to another server. The stack itself can be easily copied and reused. But do we easily export the setup of a current single docker file into a docker-compose file?
docker-autocompose to the rescue! This docker image allows you to generate a docker-compose yaml definition from a docker container.
1 |
docker pull ghcr.io/red5d/docker-autocompose:latest |
Export single or multiple containers
1 |
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose <container-name-or-id> <additional-names-or-ids>... |
Export all containers
1 |
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $(docker ps -aq) |
This has been a great tool to also quickly backup all relevant container information. Apart from the persistent data, the most important information to quickly restore a setup if needed.
Backup , backup … backup! Learned my lesson, when it comes to restoring docker setups ;) Its so easy to forget little tweaks you did to the setup of a docker container.
Starting tomorrow …
In SEO (Search Engine Optimization), there is a concept called “E-A-T” which stands for “Expertise, Authoritativeness, and Trustworthiness”.
Google uses E-A-T as one of its many ranking factors to evaluate the quality of content on the web. Websites that consistently produce high-quality content that meets the E-A-T criteria are more likely to rank well in search engine results pages (SERPs).
E-A-T is not a specific algorithm or ranking factor that Google uses, but rather a framework or set of guidelines that Google’s quality raters use to evaluate the quality of content on the web. These quality raters assess the content using E-A-T as a benchmark, and their feedback helps Google improve its search algorithms.
It is especially important for content that falls under the category of YMYL (Your Money or Your Life), which includes content related to health, finance, legal, and other topics that can impact people’s well-being or financial stability. Google holds this type of content to a higher standard because inaccurate or misleading information can have serious consequences.
Building E-A-T for your website or content involves a multi-faceted approach that includes creating high-quality, informative, and engaging content, establishing your expertise and authority in your field, and building trust with your audience through transparency and honesty.
Some specific actions you can take to improve your website’s E-A-T include showcasing the expertise of your content creators, publishing authoritative and accurate content, providing clear and transparent information about your business, and building a positive online reputation through reviews, testimonials, and other forms of social proof.
It’s important to note that E-A-T is just one of many factors that Google uses to determine search rankings, and it’s not the only factor. Other factors that can influence search rankings include content relevance, website speed and performance, user experience, and backlinks.
Just another E, for Experience. 2023 Google wants to see that a content creator has first-hand, real-world experience with the topic discussed. Which means that content and there creators are becoming far more entwined. Further pushing the trend for authoritative quality content for audiences.
So back to a solid author bios, detailed author pages and all relevant links that detail an authors expertise. Thank you! Search is really shifting and things are changing rapidly. Real content is queen or king again :)
Enjoy coding …
Together with my partners in crime (Dorit & Micha), we have finally opened our own personal online store.
We have been selling our single origin coffees (1st Single Malt Whisky Coffee, Basic – Single Origin Arabica, Kill me Quick Espresso -Single Origin Robusta), teas (Kräuterschorle – Kräutertee, Feuerkieker – Schwarztee) and rum (Fortune Teller – Double Aged Barbados Rum) using the Amazon Marketplace for the past 2 years.
GreenApe has been a side project for the past years and I never wanted to deal with the maintenance of our own store. But its time to move on and do our own thing. Amazon has removed so many useful features over the years or added a new fee on top of other fees. Even though Amazon provides access to a large amount of customers, for small companies the fees build up quickly.
With our own store we can finally do bundles, coupons again and better optimized shipping. It will also allow me to better testdrive some new interesting features for my customers ;) Yeah its kind of my new toy or shopping lab! Its fun being able to work on untested new SEO features, structured data, merchant tools, shopping ads and tracking of all of those.
We have been selling in Germany for the past 2 years, but that might be changing in the future depending how well the new store shapes up :)
If you live in Germany, love good coffee, tee or rum … say Hi!
GreenApe – Makes Your Life Better
Homepage
Shop
Contact us
“Schema.org is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond.”
This shared vocabulary from Google, Bing and Yahoo helps to understand your content!
This shows how to associate your logo with your organization.
1 2 3 |
<a href="http://www.yoursite.com/"> <img src="http://www.yoursite.com/your_logo.jpg" alt="Your logo" /> </a> |
1 2 3 4 5 |
<div itemscope itemtype="http://schema.org/Organization"> <a itemprop="url" href="http://www.yoursite.com/"> <img itemprop="logo" src="http://www.yoursite.com/yourlogo.jpg" alt="Your wonderful logo"/> </a> </div> |
Nice list of tools that will make your life easier, creating meaningful and beautiful data visualizations.
“Boba.js is a small, easily extensible JavaScript library that makes working with Google Analytics easier.”
1 2 3 4 5 6 7 8 9 10 11 12 13 |
tracker = new Boba tracker = new Boba({ siteName: 'Mandalore', pageName: 'Slave I', defaultCategory: 'category', defaultAction: 'action', defaultLabel: 'label', watch: [ ['click', '.js-track-solo', trackSolo], ['click', '.js-track-chewie', trackChewie] ] }) |
Structure opened its doors a couple of days ago.
Structure offers a simple and powerful IoT cloud platform for developing the next generation of connected experiences. They offer device management with robust data visualization that reacts in real-time.
They have a nice drag & drop workflow interface that allows you to forward data coming in, combine data or just store it.
I will be testing a builder kit with the platform, that includes the Adafruit Feather Huzzah, which offers native Wifi connectivity. My Raspberry Pi’s will also find their way into the system. The platform allows to consume REST Apis as well, that will make it even more fun to build something unique.
If you are interested in IoT, you should really check it out. Its free :)
Structure / Adafruit Feather Huzzah
Nice set of Google Analytics helper plugins.
Riveted is measuring the amount of time users are actively engaged (e.g., clicking, scrolling, using the keyboard) and then reporting the data to Google Analytics in frequent intervals. GitHub
Scroll Depth is a small Google Analytics plugin that lets you measure how far users are scrolling. GitHub
Screentime is a small tool that helps you start thinking of your website traffic in terms of time instead of hits (pageviews, visits, etc). You can define areas of the page, called Fields, and then Screentime will keep track of how much time each Field is on screen for. GitHub
Javascript Error tracking is becoming more and more important, with applications moving to the client. Many service providers already offer a variety of extensive error tracking solutions for a price. These providers help to get around browser limitations and get the most out of errors.
Depending on your budget, that might not always be an option and not always needed.
To the rescue comes ErrorBoard, that provides a basic interface to track window.onerror events. Requires Node.js, NPM and a free port.
Here the window.onerror, how I set it up for now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
// checks if there was a previously defined window.onerror and preserve it var oldOnError = window.onerror; window.onerror = function( message, url, line, column, error ) { if (errorMsg.indexOf('Script error.') > -1) { return false; } try { var e = encodeURIComponent; var meta = '{"project":"portalzine.de"}'; ( new Image() ).src = 'http://UrltoErrorBoard/error?message=' + e( message ) + '&url=' + e( url ) + '&line=' + e( line ) + '&meta=' + e( meta ) + ( error && error.stack ? '&stack=' + e( error.stack ) : '' ) + ( column ? '&column=' + e( column ) : '' ) ; } catch(e) { // we don't want errors to throw inside onerror } // Call any previously assigned handler if (typeof oldOnError === 'function') { oldOnError.apply(this, arguments); } // returning false triggers the execution of the built-in error handler return false; }; |
With inline content being loaded via ajax, you are loosing a lot of interesting usage data. These can be tracked using Google Analytics Events or by sending a Pageview.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
(function($) { track = { config:{ pageName : "Your Page", eventSelector : ".trackEvent a, .trackEvent", pageviewSelector : ".trackPage a, .trackPage", }, init : function(){ $("body").delegate(this.config.eventSelector ,"click", function(){ // Navigation / Readmore / Apply / FAQ / Contact / Share var cat = $(this).attr("data-track-cat") || "Navigation"; var action = $(this).attr("data-track-action") || "Click"; var label = $(this).attr("data-track-label") || $(this).text() ; this.sendEvent(cat, action, label); }); $("body").delegate(this.config.pageviewSelector, "click", function(){ var label = $(this).text() +" - "+ this.config.pageName var page = "/"+label.split(' ').join('-').toLowerCase()+"/"; this.sendPageview(page,label); }); }, sendEvent: function(cat, action, label){ ga('send', 'event', { 'eventCategory' : cat , 'eventAction' : action, 'eventLabel' : label, 'eventValue' : 1 }); }, sendPageview : function(page,label){ ga('send', { 'hitType': 'pageview', 'page' : page , 'title' : label }); } }; /* INIT */ track.init(); })(jQuery); |
The above allows to automate tracking by attaching simple classes and use HTML5 data attributes to assign category, action and label. Direct tracking is also possible. Lets split it up :)
1 2 3 4 5 6 7 8 9 |
$("body").delegate(".trackEvent a, .trackEvent","click", function(){ // Navigation / Readmore / Apply / FAQ / Contact / Share var cat = $(this).attr("data-track-cat") || "Navigation"; var action = $(this).attr("data-track-action") || "Click"; var label = $(this).attr("data-track-label") || $(this).text() ; this.sendEvent(cat, action, label); }); |
This monitors links with the class .trackEVENT attached and fills the event data using HTML5 data attributes. All attributes have default values assigned.
A possible link would look like this:
1 |
<a href="#" class=".trackEvent" data-track-cat="Subscribe" data-track-action="View" data-track-label="All my news!">Subscribe to my news!</a> |
The sendEvent function than sends this to Google Analytics.
1 2 3 4 5 6 7 8 |
$("body").delegate(".trackPage a, .trackPage", "click", function(){ var label = $(this).text() +" - "+ this.pageName var page = "/"+label.split(' ').join('-').toLowerCase()+"/"; this.sendPageview(page,label); }); |
Much simpler, this just gets the element text and submits the click as a new Pageview. The label gets the pagename attached and the actual page url is constructed from the label. The sendPageview function than sends this to Google Analytics.
1 2 3 |
track.sendEvent(cat, action, label); track.sendPageview(page, label); |
Really simple and effective way within a simple OnePager or a bigger web application. BTW I am using delegation to make sure that also links within AJAX content can be tracked.