Skip to content

Instantly share code, notes, and snippets.

View petrosp's full-sized avatar

Petros petrosp

  • AMS-IX
  • Amsterdam
View GitHub Profile
@adipurnama
adipurnama / configmap.yaml
Created January 16, 2021 02:10 — forked from jferris/configmap.yaml
Rails Kubernetes Manifests
apiVersion: v1
kind: ConfigMap
metadata:
name: example
namespace: default
data:
APPLICATION_HOST: example.com
LANG: en_US.UTF-8
PIDFILE: /tmp/server.pid
PORT: "3000"
@jferris
jferris / configmap.yaml
Last active June 2, 2024 13:21
Rails Kubernetes Manifests
apiVersion: v1
kind: ConfigMap
metadata:
name: example
namespace: default
data:
APPLICATION_HOST: example.com
LANG: en_US.UTF-8
PIDFILE: /tmp/server.pid
PORT: "3000"
@izzyleung
izzyleung / README.md
Last active April 25, 2024 15:17
Run TeamCity agents in your Kubernetes cluster

How to run TeamCity agents in your Kubernetes cluster

For typical CI/CD tasks that don't require Docker daemon access, use the agent.yml pod sepc.

For CI/CD jobs that need Docker daemon to build Docker images, use the privileged-agent.yml pod spec.

Notes

Make sure you are running TeamCity server version >= 2020.1 or have the Kubernetes support plugin installed.

variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
DOCKER_BUILDKIT: 1
build:
stage: build
services:
- name: docker:dind
command: ["dockerd", "--host=tcp://0.0.0.0:2375"]
@Erikdegroot89
Erikdegroot89 / list-updates.sh
Created February 1, 2019 10:16
Get all commits since last tag
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline > new-in-this-release.log
@hmps
hmps / gist:3c58f2e75d2d64233c66344561347241
Last active February 20, 2024 11:51
TMUX config and keybindings

Key bindings

So ~/.tmux.conf overrides default key bindings for many action, to make them more reasonable, easy to recall and comforable to type.

Let's go through them.

If you are an iTerm2 user, third column describes the keybinding of similar "action" in iTerm2. It's possible to reuse very same keys you already get used to and tell iTerm2 to execute analogous tmux actions. See iTerm2 and tmux integration section below.

@mipearson
mipearson / elk.rb
Created July 5, 2018 06:07
Structured Logging with Rails & ELK example files
# Copyright 2018 Marketplacer. MIT License.
require 'json'
require 'active_support/core_ext/class/attribute'
require 'active_support/log_subscriber'
module Elk
class RequestLogSubscriber < ActiveSupport::LogSubscriber
PAYLOAD_KEYS_TO_COPY = %i{
controller
@KrustyHack
KrustyHack / doc.adoc
Last active June 24, 2024 04:35
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@satendra02
satendra02 / app.DockerFile
Last active March 3, 2024 10:13
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@andyshinn
andyshinn / Dockerfile
Last active August 8, 2023 08:39
Postal on Docker
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV LOG_TO_STDOUT 1
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs