Skip to content

Instantly share code, notes, and snippets.

View zaherg's full-sized avatar
🎯
Focusing

Zaher Ghaibeh zaherg

🎯
Focusing
View GitHub Profile

RethinkBD cluster with Traefik & Docker Swarm

The main key is to create two network interfaces, one will be used with traefik and the other one will be used for the containers to communicate with each other

In the yml file I called them application and traefik, then you need to tell Traefik via the labels to use one of them.

When you deploy a stack you will have a name for it, which is also used as a prefix for the netwroks .. etc, to make it simple we will use the environment variables, so that we can have a flixable yml file.

Keybase proof

I hereby claim:

  • I am zaherg on github.
  • I am zaher (https://keybase.io/zaher) on keybase.
  • I have a public key whose fingerprint is ECBF 1A4B B882 85F4 8CE7 9428 8272 27E3 6BEB 0529

To claim this, I am signing this object:

@zaherg
zaherg / std.md
Created March 31, 2020 09:11 — forked from turbo/std.md
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
service: my-api-gateway
provider:
name: aws
runtime: nodejs6.10
region: sa-east-1
stage: v1
deploymentBucket: ${env:DEPLOYMENT_BUCKET}
iamRoleStatements:
- Effect: Allow
@zaherg
zaherg / README.md
Created May 2, 2019 16:47 — forked from boneskull/README.md
syntax highlighting for Vagrantfile in non-RubyMine JetBrains IDEs
  1. Add this file to /path/to/prefs/filetypes/
  2. Restart IDE

This page will help you find the correct directory.

@zaherg
zaherg / Readme.MD
Created April 29, 2019 13:54 — forked from JacobBennett/Readme.MD
Regarding Filesystems
<?php
namespace App\Factories;
abstract class Factory
{
public function instance()
{
return $this;
}
@zaherg
zaherg / ufw.sh
Last active February 17, 2019 11:32
ufw
#!/bin/sh
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow https
ufw allow http
ufw allow 2376/tcp
ufw allow 2377/tcp
ufw allow 4789/udp
@zaherg
zaherg / lwp-cloudflare-dyndns.sh
Created December 25, 2018 14:00 — forked from Firsh/lwp-cloudflare-dyndns.sh
CloudFlare as Dynamic DNS
#!/bin/bash
# CloudFlare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_email="[email protected]"
auth_key="global_api_key_goes_here"
zone_name="example.com"
@zaherg
zaherg / netlify.toml
Created July 28, 2018 05:59
Adding netlify.toml to your code before pushing to netlify.com
[build]
command = "npm run production"
publish = "build_production"
[build.environment]
PHP_VERSION="7.2"