Skip to content

Instantly share code, notes, and snippets.

View MerNat's full-sized avatar
🐢
I may be slow to respond.

Meron MerNat

🐢
I may be slow to respond.
View GitHub Profile
@MerNat
MerNat / multiple-repository-and-identities-git-configuration.md
Created September 13, 2020 19:08 — forked from bgauduch/multiple-repository-and-identities-git-configuration.md
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:

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.

@MerNat
MerNat / traefik-auth.conf
Created February 23, 2019 15:05 — forked from acundari/traefik-auth.conf
Traefik fail2ban
# /etc/fail2ban/filter.d/traefik-auth.conf
[Definition]
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) .+\" 401 .+$