Skip to content

Instantly share code, notes, and snippets.

View behroozam's full-sized avatar
😁
teheeee

Behrouz Hasanbeygi behroozam

😁
teheeee
View GitHub Profile
@behroozam
behroozam / config.yaml
Created June 28, 2021 15:48
build multi-arch docker images in circleci
version: 2.1
commands:
configure-dockerhub:
description: Configure Docker Hub access
steps:
- run:
name: Configure Docker Hub
command: |
@behroozam
behroozam / config.yaml
Created June 28, 2021 15:44
circleci docker buildx example
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
commands:
configure-dockerhub:
description: Configure Docker Hub access
steps:
- run:
name: Configure Docker Hub
@behroozam
behroozam / .gitlab-ci.yaml
Last active February 20, 2020 20:15
delete everything in openshift except opened merge requests on gitlab ( due resource limitation )
stages:
- test
- build
- deploy
variables:
OKD_REGISTRY: 'yourprivateregistry'
OKD_PROJECT: ${CI_PROJECT_NAME}
cleanup-okd:
@behroozam
behroozam / rename.py
Created July 27, 2019 07:20
rename by CSV
#!/usr/bin/env python3
import os
import csv
# Coded by behroozam
# Twitter @b3hroozam
CSV_FILE_LOCATION = "./trim.csv"
PICTURES_SRC = "pictures/"
@behroozam
behroozam / Dockefile
Last active May 13, 2019 09:05
laravel multi-stage Dockerfile
#
# Install PHP Dependencies
#
FROM composer:1.7 as vendor
COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock
@behroozam
behroozam / Dockerfile
Last active May 10, 2019 08:08
k8s laravel Dockerfile
FROM php:7.2-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-install -j$(nproc) iconv pdo pdo_mysql\
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
COPY fix-permission /bin/
WORKDIR /var/www/html/
@behroozam
behroozam / calico.yml
Created February 17, 2019 14:48
rancher v2 calico-ipam
# calico/kube-controllers:v3.5.1
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# Configure this with the location of your etcd cluster.
@behroozam
behroozam / Dockerfile
Last active March 4, 2024 12:15
send nginx custom log to elasticsearch with fluentd syslog input
FROM fluent/fluentd:v1.3-1
# Use root account to use apk
USER root
# below RUN includes plugin as examples elasticsearch is not required
# you may customize including plugins as you wish
RUN apk add --no-cache --update --virtual .build-deps \
build-base ruby-dev \
&& gem install \
@behroozam
behroozam / .env
Last active November 3, 2018 14:50
send laravl log to stdout
APP_LOG_LEVEL=debug
LOG_CHANNEL=stderr
@behroozam
behroozam / Dockerfile
Created September 12, 2018 12:57
kubctl image build
FROM behroozam/kube:latest
MAINTAINER behroozam <b.hasanbg@gmail.com>
COPY config /root/.kube/