Skip to content

Instantly share code, notes, and snippets.

View pourdaavar's full-sized avatar
🎲

Hossein Pourdavar pourdaavar

🎲
View GitHub Profile
@pourdaavar
pourdaavar / nginx.conf
Created March 13, 2024 16:00 — forked from eXtrem0us/nginx.conf
Nginx Image Filter with Caching for Upstream
########################################################################################################
# This config enables us to:
# - Resize
# - Rotate
# ...the resident images on an upstream server, with Nginx Server in our hand, On the fly!
# - Just by using arbitrary Query Parameters
# ...and
# - Cache the transformed image by address.
#
# Well, I got the Idea from https://stumbles.id.au/nginx-dynamic-image-resizing-with-caching.html
#!/bin/bash
# curl -sSL https://gist.githubusercontent.com/amircloner/3a7c102dd8da114576a72a361ceba275/raw/emrooz-backup-vols-arvan-s3.sh | bash -s -- backup
usage() {
>&2 echo "Usage: backup-vols.sh <backup|restore>"
exit 1
}
backup() {
backup_directory=/home/ubuntu/emrooz-backup-vols-arvan-s3
@pourdaavar
pourdaavar / restic_resticker_docker_compose.yml
Created September 6, 2023 19:21 — forked from remohoeppli/restic_resticker_docker_compose.yml
restic - resticker docker-compose.yml
version: '3.7'
services:
app:
image: mazzolino/restic:1.3.0
container_name: restic
hostname: mypi01
restart: always
environment:
BACKUP_CRON: "*/30 * * * *"
@pourdaavar
pourdaavar / backup-with-restic-and-s3.md
Created September 6, 2023 14:46 — forked from revant/backup-with-restic-and-s3.md
backup with restic and S3

For local example, start MinIO

docker run \
  -p 9000:9000 \
  -p 9001:9001 \
  --name localminio \
  -v ~/minio/data:/data \
  -e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
  -e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
@pourdaavar
pourdaavar / backup-with-restic-and-s3.md
Created September 6, 2023 14:46 — forked from revant/backup-with-restic-and-s3.md
backup with restic and S3

For local example, start MinIO

docker run \
  -p 9000:9000 \
  -p 9001:9001 \
  --name localminio \
  -v ~/minio/data:/data \
  -e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
  -e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
version: '3'
services:
minio:
image: 'bahorn/minio:latest'
command: minio server /data
restart: always
ports:
- '9000:9000'
volumes:

Minio Install

# .env
DOCKER_ROOT=/volume/1TB_NVME/docker/minio-backup

TZ=Asia/Seoul

# DB
MINIO_ROOT_USER=username