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 / .gitconfig
Created February 17, 2024 05:54
includeIf: separate git configs for personal and work
[includeIf "gitdir:~/code/<work>/"]
path = "~/code/<work>/.gitconfig"
@arsalanses
arsalanses / docker-compose.yml
Last active May 18, 2024 08:06
mysql router
services:
mysql:
image: hub.hamdocker.ir/bitnami/mysql:8.0
ports:
- '127.0.0.1:3306:3306'
# volumes:
# - 'mysql_data:/bitnami/mysql/data'
environment:
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
@arsalanses
arsalanses / docker-compose.yml
Last active February 22, 2024 09:19
logging from file into stdio
services:
tail-from-file:
image: busybox
container_name: tail-from-file
restart: unless-stopped
volumes:
- /var/log/system.log:/var/log/stream.log
command:
- tail
- -f
@arsalanses
arsalanses / manifest.yml
Created February 21, 2024 12:23
nettools kube manifest
apiVersion: v1
kind: Pod
metadata:
name: busyboy
namespace: arsalan-dev
spec:
restartPolicy: Never
nodeSelector:
kubernetes.io/hostname: 123.123.123.123
containers:
@arsalanses
arsalanses / compose.yml
Last active April 5, 2024 10:03
Web Interface for the Docker Registry + forward auth service
services:
traefik:
image: traefik:v2.11.0
command: --providers.docker
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- web
@arsalanses
arsalanses / compose.yml
Created April 6, 2024 04:03
redis_exporter
services:
redis-exporter:
image: oliver006/redis_exporter:v1.58.0
restart: unless-stopped
ports:
- "9121:9121"
environment:
REDIS_ADDR: "redis:6379"
REDIS_USER: null
@arsalanses
arsalanses / compose.yml
Last active October 12, 2025 08:24
node-exporter
services:
node_exporter:
image: prom/node-exporter:latest
container_name: node_exporter
ports:
- "127.0.0.1:9100:9100"
command:
- '--web.config.file=/opt/web-config.yml'
- '--path.rootfs=/host'
- '--collector.disable-defaults'
@arsalanses
arsalanses / compose.yml
Created April 9, 2024 07:23
Nginx + Vector, log to prometheus metrics
services:
nginx:
image: nginx:1.25.4-alpine-slim
restart: always
container_name: "nginx"
ports:
- "127.0.0.1:8080:80"
volumes:
- ./config/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
@arsalanses
arsalanses / Dockerfile
Last active April 9, 2024 07:58
Nginx + Fluentd, log to prometheus metrics
FROM fluent/fluentd:v1.16-1
USER root
RUN apk add --no-cache --update --virtual .build-deps \
sudo build-base ruby-dev \
&& sudo gem install fluent-plugin-prometheus \
&& sudo gem sources --clear-all \
&& apk del .build-deps \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
@arsalanses
arsalanses / compose.yml
Created April 23, 2024 09:49
redis insight
services:
traefik:
image: traefik:v2.11.0
container_name: traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- "traefik.enable=false"
ports:
- "80:80"