This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
__author__ = 'Christophe Labouisse' | |
import argparse | |
import re | |
import os | |
from docker import Client | |
from docker.utils import kwargs_from_env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function countContainers() { | |
docker ps -q $1 | wc -l | |
} | |
function countCrashedContainers() { | |
docker ps -a | grep -v -F 'Exited (0)' | grep -c -F 'Exited (' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy.ext.compiler import compiles | |
from sqlalchemy.sql.expression import FromClause | |
class values(FromClause): | |
named_with_column = True | |
def __init__(self, columns, *args, **kw): | |
self._column_args = columns | |
self.list = args | |
self.alias_name = self.name = kw.pop('alias_name', None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
LE_ARC_DIR="etc/archive" | |
SECRETS=$(docker secret ls | tail -n +2 | awk '{print $2}') | |
find $LE_ARC_DIR -name 'fullchain*.pem' -o -name 'privkey*.pem' | sed "s,$LE_ARC_DIR/,," | while read file | |
do | |
base_file=$(basename $file .pem | sed -r 's/[0-9]+$//') | |
version=$(basename $file .pem | sed -r 's/^.*?([0-9]+)$/\1/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Convoy Daemon | |
Before=docker.service | |
[Service] | |
ExecStart=/usr/local/bin/convoy daemon --drivers vfs --driver-opts vfs.path=/path/to/convoy/volume/storage | |
Type=simple | |
Restart=always | |
KillMode=process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
gelf { | |
type => docker | |
port => 12201 | |
} | |
} | |
filter { | |
multiline { | |
pattern => "^%{TIMESTAMP_ISO8601}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for service in $(docker service ls -f "label=le_auto" -q) | |
do | |
echo "Checking service $service" | |
docker service inspect --format '{{json .Spec.TaskTemplate.ContainerSpec.Secrets}}' $service \ | |
| sed -r 's/("File":\{)/\n/g' \ | |
| sed -n -r '/Name/ s/"[^"]+":"([^"]+)"[^"]+/\1 /g;s/"Mode":([[:digit:]]+)[^[:alnum:]]*/\1 / p' \ | |
| ( while read target uid gid mode secret_id secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/run/secrets/site.crt FROM nginx | |
COPY site.conf /etc/nginx/conf.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
EnvironmentFile=-/etc/sysconfig/docker-pfw | |
ExecStartPost=-/usr/local/bin/docker-pfw.sh start | |
ExecStopPost=-/usr/local/bin/docker-pfw.sh stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i 's,"url":"http://updates.jenkins-ci.org/download/plugins/,"url":"http://mirror.mirror.on.the.wall/plugins/,g' /var/jenkins_home/updates/default.json |
NewerOlder