Redis setup

Redis is a very popular in-memory database when it comes to caching. This post covers the basic configurations for setting up a Redis instance in docker.

Directory Structure

Create a directory named and ensure the following file structure.

redisdb/
├── data/
├── redis.conf

The directory will contain the snapshots taken over time (as and/or ).

The file will contain the instance configurations.

Configurations

The below configurations are what seems important in general. Rest can be left to defaults.

Network

bind 0.0.0.0       # bind to all available interfaces
protectedmode no # since we're not serving over localhost
port 6379 # default…

If you’re coming here for the first time, please take a look at the prequel Self-Hosted MongoDB.

Alright then, picking from where we left off, let’s get started with the data migration.

Now, the basic steps to migrate data from one MongoDB to another would be:

  1. Create a zipped backup of the existing data
  2. Dump the data in a new DB

This is very straight forward when the source database is not online. Because we know for sure that there won’t be any new documents created/updated during the migration process.

Let’s look at simple migration first before diving into the…


Let’s Encrypt is a nonprofit Certificate Authority(CA) providing TLS certificates to 260 million websites.

Install Certbot

I’m using an Ubuntu 20.4 instance on DigitalOcean for the demo and running my webserver on Nginx.

sudo apt install certbot python3-certbot-nginx

The above command downloads the certbot CLI tool along with it’s nginx plugin.

Generate Certificates

Manual Certificates

Say you have multiple subdomains available for your site e.g.
mysite.com, api.msysite.com, console.mysite.com

You might want to consider this option and generate a wildcard certificate valid for the names
1. mysite.com
2. *.mysite.com

I’m going to use as the domain name here

certbot certonly --manual -d 'insurewill.com,*.insurewill.com'

The above command…


You’re probably hosting your MongoDB on a reliable cloud service provider say Atlas for instance because you really want to focus on your idea and delegate all the subtle key management areas such as networking, storage, access, etc.

It all looks good initially until your small idea starts turning into a business and the cost starts skyrocketing. Even if that is not the case, this post will still give you a general overview of the technical complexities involved (and bucks saved!) if you were to migrate to a self-hosted solution.

BTW, how much savings are we talking about? Let’s do…


Hi there! This is my first post so far on Medium. It covers customizing and extending the built-in service worker in a React application curated using CRA boilerplate.

What is a service worker?

A service worker is a script that runs on a background thread and acts as a network proxy for the web application. It has capabilities such as intercepting all network requests within specified scope, caching files, background sync, push notification, etc which makes it very useful for adding offline support in a site or building a PWA(Progressive Web App).

Service worker overview

Chinmaya Pati

Engineering @ Upraised | Working on something cool

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store