Archive

Archive for the ‘Interesting’ Category

Docker Compose Local HTTPS with nginx or Caddy and mkcert

September 6, 2019 Leave a comment

Why run your project with HTTPS locally?
In most instances, your production site will run with TLS/SSL enabled, ie. over HTTPS. This tends not to be a concern of your application, ie the SSL termination is dealt with at the ingress/reverse-proxy/load-balancer level.

However your application may rely on the assumption that it’s running over an SSL connection. For example, the Set-Cookie header has a Secure attribute which means the cooke will only be sent over a TLS/SSL connection. That means that locally, you would need the code to fork to enable sending of cookie over non TLS/SSL connection, in other words if environment = local => don’t enable Secure.

https://codewithhugo.com/docker-compose-local-https/

Advertisements
Categories: Interesting

No networking in Docker containers under Debian 10 — Unixblogger

August 19, 2019 Leave a comment

I finally started to migrate the first few servers to Debian 10, codename “Buster”. With the last upgrades I never stumbled upon any issues. However, this time we see a problem when using Docker as the containers are unable to communicate to the internet. Upgrade to Debian 10 reliable as always As usually, the upgrade…

via No networking in Docker containers under Debian 10 — Unixblogger

Categories: Interesting

Using Docker Volumes to Share Data Between Containers and Host Computer

August 4, 2019 Leave a comment

Docker volumes are used to persist data from a certain directory or directories of your Docker containers. So your data is not removed when the container stops or is removed.

You can also share a Docker volume to many containers. Let’s talk about a scenario to find out why it’s important.

Let’s say you have a PHP web application. Now you want to test whether it works on PHP version 5.4, 7.0, 7.1, and 7.2. You can create a Docker volume, let’s call it webapp. Then copy the source code files of your PHP web app to the Docker volume webapp. Then you can create containers of different PHP versions and attach the Docker volume webapp to WEBROOT of all these containers. That way, you can easily test how your web app performs on different PHP versions.

In this article, I will show you how to use Docker volumes to share data between containers and the host computer. Let’s get started.

https://linuxhint.com/docker_volume_share_data/

Categories: Interesting Tags:

How to Set Up a Prometheus, Grafana and Alertmanager Monitoring Stack on DigitalOcean Kubernetes

July 19, 2019 Leave a comment

Introduction

Along with tracing and logging, monitoring and alerting are essential components of a Kubernetes observability stack. Setting up monitoring for your DigitalOcean Kubernetes cluster allows you to track your resource usage and analyze and debug application errors.

A monitoring system usually consists of a time-series database that houses metric data and a visualization layer. In addition, an alerting layer creates and manages alerts, handing them off to integrations and external services as necessary. Finally, one or more components generate or expose the metric data that will be stored, visualized, and processed for alerts by the stack.

One popular monitoring solution is the open-source Prometheus, Grafana, and Alertmanager stack, deployed alongside kube-state-metrics and node_exporter to expose cluster-level Kubernetes object metrics as well as machine-level metrics like CPU and memory usage.

Rolling out this monitoring stack on a Kubernetes cluster requires configuring individual components, manifests, Prometheus metrics, and Grafana dashboards, which can take some time. The DigitalOcean Kubernetes Cluster Monitoring Quickstart, released by the DigitalOcean Community Developer Education team, contains fully defined manifests for a Prometheus-Grafana-Alertmanager cluster monitoring stack, as well as a set of preconfigured alerts and Grafana dashboards. It can help you get up and running quickly, and forms a solid foundation from which to build your observability stack.

In this tutorial, we’ll deploy this preconfigured stack on DigitalOcean Kubernetes, access the Prometheus, Grafana, and Alertmanager interfaces, and describe how to customize it.

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-prometheus-grafana-and-alertmanager-monitoring-stack-on-digitalocean-kubernetes

Categories: Interesting Tags:

(Right to Left (The Mirror World

May 18, 2019 Leave a comment

It might seem that there is something wrong with the title up there, right? This is one of the challenges developers are likely to face when adding support for languages like Arabic on websites. In this blog post, we talk about the problems we faced and the solutions we came up with when supporting Arabic on the Spotify desktop client and web player.

Localization at Spotify is a big deal. Our mission is to “unlock the potential of human creativity—by giving a million creative artists the opportunity to live off their art and billions of fans the opportunity to enjoy and be inspired by it.” To achieve this mission, it’s important to be able to effectively communicate across the various languages that reflects the diversity of our users . Recently Spotify launched in the North Africa and West Asia regions. One of the languages spoken in these regions is Arabic. Unlike English, which is read from left to right, Arabic is read from right to left. This has implications for websites that want to support Arabic.

https://labs.spotify.com/2019/04/15/right-to-left-the-mirror-world/

Categories: Interesting

Ansible for deployment with docker — Schneide Blog

May 17, 2019 Leave a comment

We are using Jenkins not only for our continuous integration needs but also for running deployments at the push of a button. Back in the dark times™ this often meant using Apache Ant in combination with JSch to copy the projects artifacts to some target machine and execute some remote commands over ssh. After gathering […]

via Ansible for deployment with docker — Schneide Blog

Categories: Interesting

Remapping PgUp and PgDn Keys

May 8, 2019 Leave a comment

Problem:
PgDn/PgUp keys are too close to Left, Right arrow keys. They end up getting pressed unintentionally.

Solution:
Remap PgDn and PgUp to right and left arrow keys respectively.

Added this to the end of my .zshrc file.
# Disable pgdwn and pgup. Make the map to the arrow keys instead.
/usr/bin/xmodmap -e "keycode 112 = Left"
/usr/bin/xmodmap -e "keycode 117 = Right"

Source:
https://stackoverflow.com/questions/46316946/dell-xps-9395-disable-pgup-pgdwn-keys
https://askubuntu.com/questions/296155/how-can-i-remap-keyboard-keys

Categories: Interesting Tags: , , , ,