use git diff to generate file list
git diff --name-only master
add ext filter
use git diff to generate file list
git diff --name-only master
add ext filter
This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.
Features:
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
Today I wanted to make a recording of me running some commands inside a docker-container.
❯ docker-compose run app bash
root@e9bb2af4dc11:/usr/local/go/src/example.com/dev/project#
Needless to say it looked a bit bland with no colors and a long prompt that prevents me from recording a small terminal and show the full commands I'm
--- | |
- hosts: docker-nodes | |
become: true | |
vars: | |
docker_swarm_addr: "{{ hostvars[inventory_hostname]['ansible_' + docker_swarm_interface]['ipv4']['address'] }}" | |
docker_swarm_cert_expiry: '2160h0m0s' # Validity period for node certificates (default 2160h0m0s) | |
docker_swarm_dispatcher_heartbeat_duration: '5s' # Dispatcher heartbeat period (default 5s) | |
docker_swarm_interface: "enp0s8" | |
# docker_swarm_managers_ansible_group: 'docker-swarm-managers' | |
docker_swarm_networks: |
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository | |
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# http://xiaofan.at | |
# 2 Jul 2015 - Xiaofan | |
# Machine name. | |
function box_name { |
# Copyright 2016-2022 Paul Durivage | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
#!/bin/bash | |
################################################################################################################## | |
#Gatling scale out/cluster run script: | |
#Before running this script some assumptions are made: | |
#1) Public keys were exchange inorder to ssh with no password promot (ssh-copy-id on all remotes) | |
#2) Check read/write permissions on all folders declared in this script. | |
#3) Gatling installation (GATLING_HOME variable) is the same on all hosts | |
#4) Assuming all hosts has the same user name (if not change in script) | |
################################################################################################################## |
Using Python to check if remote port is open and accessible.
Taken from http://snipplr.com/view/19639/test-if-an-ipport-is-open/
Usage: