Skip to content

Instantly share code, notes, and snippets.

View MahdadGhasemian's full-sized avatar

Mahdad Ghasemian MahdadGhasemian

View GitHub Profile
@MahdadGhasemian
MahdadGhasemian / docker-compose.yml
Last active February 15, 2025 07:35
How to config a Redis Cluster in local with docker-compose
version: "3.7"
services:
# Node 0
redis-node-0:
image: docker.io/bitnami/redis-cluster:7.4
volumes:
- redis_cluster_data_0:/bitnami/redis/data
environment:
- "REDIS_PASSWORD=bitnami"
@MahdadGhasemian
MahdadGhasemian / mongodb_replica_set_docker_compose.md
Last active December 4, 2024 06:36
Setting Up a MongoDB Replica Set With Docker Compass (Local Test)

How to Set Up a stable MongoDB Replica Set Localy for Developing

version: "3.9"

services:
  mongodb-primary:
    image: docker.io/bitnami/mongodb:5.0
    environment:
      - MONGODB_ADVERTISED_HOSTNAME=mongodb-primary
@MahdadGhasemian
MahdadGhasemian / behind_proxy.md
Last active September 29, 2024 13:59
Bash, APT, Docker, K3S, Gitlab Runner Behind Proxy ?

1. bash behind proxy:

Edit .profile file (with vi or nano)

nano .profile

And add following lines:

export http_proxy=http://127.0.0.1:8888/
export https_proxy=http://127.0.0.1:8888/
@MahdadGhasemian
MahdadGhasemian / minio_backup_restore_guide.md
Created July 25, 2024 10:26
Steps to backup and restore Minio Buckets

Restore Backup with Minio (Minio <----> Local)

Instructions for restoring buckets using Minio mirror features.

Install Minio Client

Install Link install link

Linux AMD64 DEB:

@MahdadGhasemian
MahdadGhasemian / longhorn_restore_guide.md
Last active January 21, 2025 03:01
Steps to restore backed-up data using Longhorn, with a PostgreSQL example.

Restore Backup with Longhorn

Instructions for restoring data using Longhorn backup and restore features.

Restore Backup

Example: Restoring PostgreSQL Data

  1. Scale Down the PostgreSQL StatefulSet:
@MahdadGhasemian
MahdadGhasemian / DetermineAvailableDiskSpaceOnHetznerVolume.md
Last active January 15, 2025 22:05
Determine Available Disk Space on Hetzner Volume (K3S)

This guide will help you determine the available disk space on a Hetzner volume assigned to a K3S node.

1- Find Volume ID

  • Using hcloud CLI:

Run the following command to list your volumes:

hcloud volume list