Skip to content

Instantly share code, notes, and snippets.

View arsalanses's full-sized avatar
🧠
lets play chess

Arsalan Sefidgar arsalanses

🧠
lets play chess
View GitHub Profile
@arsalanses
arsalanses / compose.yml
Last active June 28, 2025 09:11
gitlab runner
services:
gitlab-runner:
restart: unless-stopped
image: gitlab/gitlab-runner:alpine
volumes:
- ./config.toml:/etc/gitlab-runner/config.toml:ro
- /var/run/docker.sock:/var/run/docker.sock
sudo nano /etc/systemd/resolved.conf
# [Resolve]
DNS=217.218.127.127 217.218.155.155
FallbackDNS=10.70.95.162
sudo systemctl restart systemd-resolved
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
@arsalanses
arsalanses / README.md
Created May 28, 2025 06:25
Docker Swarm with Consul Setup for Service Discovery

Docker Swarm with Consul Setup for Service Discovery

As a DevOps engineer, I'll provide a complete setup for integrating Consul with Docker Swarm for service discovery, along with a practical example scenario.

Architecture Overview

[Docker Swarm Cluster]
│
├── [Manager Nodes] - Run Consul server agents
@arsalanses
arsalanses / compose.yml
Created March 3, 2025 13:40
victoria-logs + vector + docker
services:
victorialogs:
image: victoriametrics/victoria-logs:v1.15.0-victorialogs
command:
- "--storageDataPath=/victoria-logs-data"
- "--httpListenAddr=:9428"
- "--retentionPeriod=5d"
- "--retention.maxDiskSpaceUsageBytes=2Gib"
volumes:
- victorialogs-data:/victoria-logs-data
@arsalanses
arsalanses / readme.md
Last active March 2, 2025 12:48
centrifugo

centrifugo

services:
  centrifugo:
    image: centrifugo/centrifugo:v6.0
    command: centrifugo --config=config.json
    volumes:
      - ./config.json:/centrifugo/config.json
    ports:
@arsalanses
arsalanses / decrypt.sh
Last active February 8, 2025 08:54
nerdctl image encrypt
#!/bin/sh
set -x
nerdctl pull --unpack=false reg.example.ir/nginx:encrypted
nerdctl image decrypt --key=dockerkey.pem reg.example.ir/nginx:encrypted reg.example.ir/nginx:decrypted
services:
nginx:
image: nginx:1.27
restart: always
#ports:
# - "80:80"
volumes:
- ./conf.d/tgapi.conf:/etc/nginx/conf.d/tgapi.conf
# - ./conf.d/nginx.conf:/etc/nginx/nginx.conf
# - ./log:/var/log/nginx
@arsalanses
arsalanses / compose.yml
Created January 7, 2025 19:29
phpmyadmin
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.2
container_name: phpmyadmin
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_ARBITRARY: 0
depends_on:
- db
@arsalanses
arsalanses / promtail_docker_logs.md
Created December 14, 2024 08:06 — forked from ruanbekker/promtail_docker_logs.md
Docker Container Logging using Promtail